Witam
Chciałbym aby ktoś byłby wstanie przerobić plik tak aby przy nicku były widoczne rangi(na sayu jak ktoś pisze cos)
np [Champion]"nick": say say say
Link do orginału pliku http://amxx.pl/topic...lefield-3-rank/
#include <amxmodx>
#include <amxmisc>
#include <csx>
#define PLUGIN "Rangi - /rank"
#define VERSION "1.2"
#define AUTHOR "Sn!ff3r"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /rank", "rank", 0, "- wyswietla range i statystyki")
}
public rank(id)
{
static stats[8], body[8], rankpos, rankmax
get_user_stats(id, stats, body)
rankpos = get_user_stats(id, stats, body)
rankmax = get_statsnum()
client_print(id, print_chat, "* Jestes na poziomie %s, zajmujesz %d pozycje z %d ogolem", get_rankname(stats[0]), rankpos, rankmax)
client_print(id, print_chat, "* Posiadasz %d zabojstw, %d smierci oraz %d headshot'ow, zadajac %d obrazen.", stats[0], stats[1], stats[2], stats[6])
return PLUGIN_HANDLED
}
stock get_rankname(frags)
{
static ranga[30]
if ( frags >= 0 && frags <= 10)
formatex(ranga,29,"lama")
else if ( frags >= 11 && frags <= 20)
formatex(ranga,29,"nieogar")
else if ( frags >= 21 && frags <= 30)
formatex(ranga,29,"skoczek")
else if ( frags >= 31 && frags <= 40)
formatex(ranga,29,"Runner")
else if ( frags >= 41 && frags <= 50)
formatex(ranga,29,"Parkourowiec")
else if ( frags >= 51 && frags <= 100)
formatex(ranga,29,"Profesjonalista")
else if ( frags >= 101 && frags <= 500)
formatex(ranga,29,"Master")
else if ( frags >= 501 && frags <= 1000)
formatex(ranga,29,"Champion HNS")
return ranga
}
Użytkownik unlimited edytował ten post 25.08.2014 23:49


Dodatki SourceMod














