10.05.2014, 18:30
Hi everybody, im playing with the variables, and i decided to make a small XP system for my server, its not alot of code haha but here is it:
But the problem is, when i have like only 2 XP points and i get killed so thats 2-4 thats not possible, but when i type /getxp (shows me how much XP i have) it says random characters, and if i do /xp (it needs to give me 50xp) and then do /getxp it says just 2 like i have 2 xp or something
Please help me out ;o
Код:
new PlayerXP[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerXP[playerid] = -5;
SendClientMessage(playerid, 0, "You lost 5 xp points!");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/xp", cmdtext, true, 10) == 0)
{
PlayerXP[playerid] += 50;
return 1;
}
if (strcmp("/getxp", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0, PlayerXP[playerid]);
return 1;
}
return 0;
}
Please help me out ;o

