14.10.2013, 17:53
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]++;
}
}

