18.04.2010, 05:23
La OnPlayerCommandText:
dcmd(giveallscore,12,cmdtext);
//inainte de "dcmd_setscore" pui asta:
dcmd(giveallscore,12,cmdtext);
//inainte de "dcmd_setscore" pui asta:
pawn Code:
dcmd_giveallscore(playerid,params[])
{
if(PlayerInfo[playerid][Level] >= 4) {
new tmp[256], Index; tmp = strtok(params,Index);
if(!strlen(tmp) || !IsNumeric(tmp)) return SendClientMessage(playerid, red, "USAGE: /giveallscore [score]");
new score = strval(tmp), string[128];
CMDMessageToAdmins(playerid,"giveallscore");
for(new i;i<GetMaxPlayers();i++)
{
SetPlayerScore(i,GetPlayerScore(i)+score);
}
format(string,128,"Administratorul %s va dat la toti %d score...",pName(playerid),score);
} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
return 1;
}