18.05.2014, 14:41
If you've included 'ZCMD' and also 'sscanf2'
Add this at the bottom of the script
Below OnPlayerCommandText
I didn't quite know what you're asking for, but here you go.
Add this at the bottom of the script
pawn Код:
#include "zcmd"
#include "sscanf2"
Below OnPlayerCommandText
pawn Код:
COMMAND:xp(playerid, params[])
{
if(PlayerAcc[playerid][AdminLevel] >= 4) // change this to the ranks of your admin.
{
new target;
new amount;
if(sscanf(params, "ud", target, amount)
{
new str[128];
format(str, sizeof(str), "Your XP has been set to %d .", amount);
SendClientMessage(playerid, 0xFFFFFFF, str);
PlayerAcc[playerid][xp] == amount; //change to the way your system works
}
else SendClientMessage(playerid, -1, "USAGE: /xp [playerid/partofname] [amount of xp]");
}
else SendClientMessage(playerid, -1, "This command does not exist in our database.");
return 1;
}