25.09.2012, 14:54
pawn Код:
CMD:giveallscore(playerid, params[])
{
if(PInfo[playerid][Level] < 4) return SendClientMessage(playerid,0xFF0000AA,"ERROR: You are not allowed to use this command!");//Checking if the player has admin level 3, if not it sends him a message.
for(new i=0; i<MAX_PLAYERS; i++)
{
new ammount;
if(sscanf(params,"i", ammount))return SendClientMessage(playerid, 0xFF0000AA, "Usage: /giveallscore [score]");
else
{
new score = GetPlayerScore(i);
SetPlayerScore(i, score + ammount);
new pname[24],dstring[124];
GetPlayerName(playerid,pname,sizeof(pname));
format(dstring, sizeof(dstring), "Administrator %s has given everybody %d score.", pname, ammount);
SendClientMessageToAll(blue, dstring);
}
return 0;
}
return 1;
}
pawn Код:
Administrator Max has given everybody (amount) score
But it also returns this message
pawn Код:
SERVER: That command does not exist, use /cmds for all our commands