dcmd_setallcash(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 3) {
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /setallcash [Amount]");
new var = strval(params), string[128];
CMDMessageToAdmins(playerid,"SETALLCASH");
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
PlayerPlaySound(i,1057,0.0,0.0,0.0);
ResetPlayerMoney(i);
GivePlayerMoney(i,var);
}
}
format(string,sizeof(string),"Administrator \"%s\" has set all players cash to '$%d'", pName(playerid), var );
return SendClientMessageToAll(blue, string);
} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}
Question
alinutz_boy32
Cum transform o comanda din Dcmd in CMD ...
Am aceasca comanda
dcmd_setallcash(playerid,params[]) { if(PlayerInfo[playerid][Level] >= 3) { if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /setallcash [Amount]"); new var = strval(params), string[128]; CMDMessageToAdmins(playerid,"SETALLCASH"); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { PlayerPlaySound(i,1057,0.0,0.0,0.0); ResetPlayerMoney(i); GivePlayerMoney(i,var); } } format(string,sizeof(string),"Administrator \"%s\" has set all players cash to '$%d'", pName(playerid), var ); return SendClientMessageToAll(blue, string); } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command"); }5 answers to this question
Recommended Posts