[Help]Givemoneyall and levelup commands in zcmd
#2

You can add in your own requirements to use the commands.

pawn Код:
CMD:giveallmoney(playerid,params[])
{
        if(PlayerInfo[playerid][pAdmin] <= 2) return  SendClientMessage(playerid,-1,"ERROR: You are not allowed to use that command!"); //only level 3+ admins can use the command, for example.
    new cash;
    if(sscanf(params,"i",cash)) return SendClientMessage(playerid,-1,"USAGE: /giveallmoney [amount]");
    for(new i=0; i< MAX_PLAYERS; i++)
    {
        GivePlayerMoney(i,cash);   
    }
    //not sure if you have the foreach inc so I'll just use a for loop.
}

CMD:levelupall(playerid,params[])
{
        if(PlayerInfo[playerid][pAdmin] <= 2) return  SendClientMessage(playerid,-1,"ERROR: You are not allowed to use that command!"); //only level 3+ admins can use the command, for example.
    for(new i=0; i< MAX_PLAYERS; i++)
    {
        PlayerInfo[i][pLevel]++;
    }
}
Reply


Messages In This Thread
[Help]Givemoneyall and levelup commands in zcmd - by mikjo - 14.10.2013, 17:49
Re: [Help]Givemoneyall and levelup commands in zcmd - by EiresJason - 14.10.2013, 17:53

Forum Jump:


Users browsing this thread: 1 Guest(s)