Code:
#include amxmodx
#define MAXLEVEL 10
new const LEVELS[MAXLEVEL] =
{ 50, 100, 150, 200, 250, 300, 350, 400, 450, 500 }
new xp[MAX_PLAYERS + 1], level[MAX_PLAYERS + 1]
public plugin_init()
register_clcmd ("say test", "test")
public test(id){
xp[id]++
set_task(1.0, "mesage", id)
}
public mesage(id)
{
if(level[id] == MAXLEVEL) return;
while(xp[id] > LEVELS[level[id]])
{
level[id]++
xp[id] = 0
}
client_print(id, print_chat, "Percente: %.1f%%/%d%", 100.0 * xp[id] / (LEVELS[level[id]]), 100)
}
__________________