AKKOr ezt itt
Kód:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <csx>
#include <hamsandwich>
new kills[32]
public plugin_init()
{
register_plugin("Stats rank", "1.1", "QQCS")
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
}
public fwHamPlayerSpawnPost(id)
{
if ( is_user_alive(id) )
{
new stats[8], bodyhits[8]
get_user_stats(id, stats, bodyhits)
stats[0] = kills[id]
name_stuff(id)
}
}
public client_infochanged(id)
{
new OldName[32], NewName[32]
get_user_name(id, OldName, 31)
get_user_info(id, "name", NewName, 31)
if ( equal(OldName, NewName) ) return
name_stuff(id)
}
name_stuff(id)
{
new Name[32]
get_user_name(id, Name, 31)
if ( kills[id] < 5 )
{
new prefix[] = "[Kezdo]"
new FullName[64]
formatex(FullName, charsmax(FullName), "%s %s", prefix, Name)
set_user_info(id, "name", FullName)
}
else if ( kills[id] < 10 )
{
new prefix[] = "[Halado]"
new FullName[64]
formatex(FullName, charsmax(FullName), "%s %s", prefix, Name)
set_user_info(id, "name", FullName)
}
else if ( kills[id] < 15 )
{
new prefix[] = "[KozepHalado]"
new FullName[64]
formatex(FullName, charsmax(FullName), "%s %s", prefix, Name)
set_user_info(id, "name", FullName)
}
else if ( kills[id] < 20 )
{
new prefix[] = "[PrO]"
new FullName[64]
formatex(FullName, charsmax(FullName), "%s %s", prefix, Name)
set_user_info(id, "name", FullName)
}
else if ( kills[id] < 50 )
{
new prefix[] = "[HarD]"
new FullName[64]
formatex(FullName, charsmax(FullName), "%s %s", prefix, Name)
set_user_info(id, "name", FullName)
}
else if ( kills[id] < 100 )
{
new prefix[] = "[HarDPrO]"
new FullName[64]
formatex(FullName, charsmax(FullName), "%s %s", prefix, Name)
set_user_info(id, "name", FullName)
}
else if ( kills[id] > 100 )
{
new prefix[] = "[IMMORTAL]"
new FullName[64]
formatex(FullName, charsmax(FullName), "%s %s", prefix, Name)
set_user_info(id, "name", FullName)
}
}
módosítani kéne úgy hogy ellenőrizze minden személynél hogy admin-e és ha admin akkor ne csináljon semmit.