19.03.2018, 01:18
Quote:
PHP код:
|
Ex:
Код:
for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { SetPlayerScore(i, GetPlayerScore(i) + SCORE); } }
Код:
CMD:setscoretodos(playerid, params[]) { new String[130], SCORE ; if(sscanf(params, "i", SCORE)) return SendClientMessage(playerid, -1, "/SetScore [SCORE]."); if(SCORE < 0 || SCORE > 99999) return SendClientMessage(playerid, -1, "Setagem de 0 a 99999."); if(Player[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Vocк nгo tem permissгo para usar o comando."); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { SetPlayerScore(i, GetPlayerScore(i) + SCORE); } } format(String, sizeof(String), "O player %s deu %i de score para todos jogadores online.", Nome(playerid), SCORE); SendClientMessageToAll(-1, String); return true; }