Give XP Command
#5

If you've included 'ZCMD'.

And sscanf2

If not, so add this at the top of your script:

pawn Код:
#include "zcmd"
#include "sscanf2"
Here is some help:

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;
}
Reply


Messages In This Thread
Give XP Command - by LuffyD - 29.03.2013, 14:59
Re: Give XP Command - by Joshman543 - 29.03.2013, 15:11
AW: Give XP Command - by LuffyD - 29.03.2013, 15:49
Re: Give XP Command - by OrMisicL - 29.03.2013, 15:58
Re: Give XP Command - by ACI - 29.03.2013, 16:19
AW: Give XP Command - by LuffyD - 29.03.2013, 17:56

Forum Jump:


Users browsing this thread: 1 Guest(s)