[Help]Givemoneyall and levelup commands in zcmd
#1

Hey everyone i need help for making command in zcmd for giving all players money, and giving level up to all players. my varibale for Level is pLevel is someone want to help to make this 2 commands
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)