27.10.2011, 03:39
(
Последний раз редактировалось jejemonerz123; 27.10.2011 в 05:09.
)
SOLVED
pawn Код:
dcmd_giveallscore(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 3) {
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /giveallscore [score]");
new var = strval(params), string[128];
CMDMessageToAdmins(playerid,"GIVEALLSCORE");
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
PlayerPlaySound(i,1057,0.0,0.0,0.0);
SetPlayerScore(playerid, GetPlayerScore(playerid)+var);
}
}
format(string,sizeof(string),"Administrator \"%s\" has given all players '%d' score/s", pName(playerid), var );
return SendClientMessageToAll(blue, string);
} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}