Hi, i'm working on a xp mod by using fxfighters tutorial.
And for some reason my rank won't upgrade at lvl 10.
After a long hard search i used client_print to find the error.
Now the plugin thinks i'm a bot??
I was killing a bot and playing on a listen server.
here's the deathmsg,
PHP Code:
public PlayerDeath(id ,attacker)
{
new attacker = read_data(1);
new headshot = read_data(3);
new clip, ammo, weapon = get_user_weapon(attacker, clip, ammo);
playerxp[attacker] += get_pcvar_num(xp_kill);
if(headshot)
playerxp[attacker] += get_pcvar_num(xp_hs);
if(weapon == CSW_KNIFE)
playerxp[attacker] += get_pcvar_num(xp_knife);
while(playerxp[attacker] >= LEVELS[playerlevel[attacker]])
{
playerlevel[attacker] += 1;
client_print(attacker, print_chat, "Congratulations! You are a level %i %s!",playerlevel[attacker], RANKS[playerrank[attacker]]);
}
if(playerlevel[attacker] == 10)
{
if(!is_user_connected(attacker))
{
client_print(0, print_chat, "Not Connected")
}
if(!is_user_bot(attacker))
{
client_print(0, print_chat, "i'm a bot.")
}
client_print(0, print_chat, "lvl check works.")
updaterank(id)
}
showhud(attacker);
savedata(attacker);
}
__________________