Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSSMVP Of the Round v1.0


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Most Valuable Player Of the Round 1.0

Informations
Description
This script can detect the best killer or the planter ( if the bomb exploded ) or the defuser ( if the planted bomb is defused ).
After the event is detected, it is showing a colored print in chat to all conected players.
Also, this script is supporting reHLDS's ReAPI, you can uncomment line 4
PHP Code:

#define USE_REAPI 

to use ReAPI instead of HamSandwich and some events.

Requirements
  • AmxModX 1.9.0+
  • Hamsandwich module
  • ReAPI Module ( reHLDS Needed )
Installation
  • Download the archive from down below.
  • Compile most_valuable_player.sma using a local compiler or a web compiler which supports custom includes.
  • Put most_valuable_player.amxx in amxmodx/plugins folder
  • Go to amxmodx/configs/plugins.ini, open the file and write on the last line most_valuable_player.amxx.
  • Restart your server or change the map.
API
What mean API ? API is an abbreviation from Application Programming Interface and it's used to make external scripts which are for compatibility purpose.
INC File:
PHP Code:

/* Sublime AMXX Editor v4.2 */

#if defined _most_valuable_player_included
    #endinput
#endif
#define _most_valuable_player_included

#pragma reqlib most_valuable_player
#if !defined AMXMODX_NOAUTOLOAD
    #pragma loadlib most_valuable_player
#endif

enum WinScenario
{
    
NO_SCENARIO = -1,
    
TERO_MVP 0,
    
CT_MVP,
    
KILLER_MVP_TERO,
    
KILLER_MVP_CT
}

enum _:DamageData
{
    
iDamage 0,
    
iHeadshotsDmg
}

/**
 * @description            Multiforward called when a round end.
 *
 * @param scenario        Scenario index. See WinScenario enum
 * @return                Scenario index.
 */
forward csgor_user_logging_in(WinScenario:scenario);

/**
 * Returns player's MVP kills.
 *
 * @param id        Player index.
 * @return            Amount of kills. -1 on error.
 */
native get_user_mvp_kills(id);

/**
 * Returns top killer's index.
 *
 * @param id        Top killer index.
 * @return            Top killer's index. -1 on error.
 */
native get_user_mvp_topkiller(id);

/**
 * Returns player's MVP damage.
 *
 * @param id        Player index.
 * @return            Player index. -1 on error.
 */
native get_user_mvp_damage(id);

/**
 * Returns player's MVP damage made with headshot.
 *
 * @param id        Player index.
 * @return            Player index. -1 on error.
 */
native get_user_mvp_hs_damage(id); 

Credits

Amxx-BG for providing API for ReAPI
Destro- for his Sublime AMXX-Editor
To Do List
  • Nothing
Issues[INDENT]
  • No issue

ChangeLog
  • V 1.0:
  • Initial Release
Also, this project is available on GitHub Here

Attached Files
File Type: zip MostValuablePlayer-1.0.zip (4.9 KB)
File Type: sma Get Plugin or Get Source (most_valuable_player.sma - 9.3 KB)
File Type: inc most_valuable_player.inc (1.2 KB)

Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...