AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   show highest exp (https://forums.alliedmods.net/showthread.php?t=170493)

amxinclude 10-25-2011 14:01

show highest exp
 
i want a plugin shows highest exp at the corner
xp = PlayerXP[id]

avril-lavigne 10-25-2011 17:50

Re: show highest exp
 
U need something like this



public client_experience()
{
new Players[32], iNum
get_players(Players, iNum)

for(new i = 0; i < iNum; ++i)
{
new id = Players[i]
if(is_user_alive(id))
{
new InfoMsg[255]
format(InfoMsg, 254, "XP: %d/%d", g_PlayerXP[id], your variable here[id])

message_begin(MSG_ONE, get_user_msgid("StatusText"), {0, 0, 0}, id)
write_byte(0)
write_string(InfoMsg)
message_end()
}


}
return PLUGIN_CONTINUE
}

amxinclude 10-26-2011 14:20

Re: show highest exp
 
it wont work please help :S

Backstabnoob 10-27-2011 03:10

Re: show highest exp
 
If you want to show the highest EXP on server, use something like this:


Code:
new Exp, i for(i = 0; i < g_maxplayers; i++)    if(PlayerXP[i] > Exp)        Exp = PlayerXP[i]

Then use hudmsg or call StatusText message.

amxinclude 11-19-2011 06:42

Re: show highest exp
 
Thanks Backstabnoob


All times are GMT -4. The time now is 14:25.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.