29.03.2013, 16:19
(
Последний раз редактировалось ACI; 31.03.2013 в 12:49.
Причина: Changed 'd' to 'u'.
)
If you've included 'ZCMD'.
And sscanf2
If not, so add this at the top of your script:
Here is some help:
And sscanf2
If not, so add this at the top of your script:
pawn Код:
#include "zcmd"
#include "sscanf2"
pawn Код:
COMMAND:xp(playerid, params[])
{
if(PlayerAcc[playerid][AdminLevel] >= 4) // change this to your admin system.
{
new target;
new amount;
if(sscanf(params, "ud", target, amount)
{
new str[128];
format(str, sizeof(str), "Your XP is now %d .", amount);
SendClientMessage(playerid, 0xFFFFFFF, str);
PlayerAcc[playerid][xp] == amount; //change to your system.
}
else SendClientMessage(playerid, -1, "USAGE: /xp [Player ID] [Amount]");
}
else SendClientMessage(playerid, -1, "Urm... This command is not scripted yet. Use /help to see new commands.");
return 1;
}