22.09.2012, 23:51
PHP код:
CMD:spawnall(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][Level] >= 4) {
CMDMessageToAdmins(playerid,"SPAWNAll");
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && (i != playerid) && i != ServerInfo[MaxAdminLevel]) {
PlayerPlaySound(i,1057,0.0,0.0,0.0); SetPlayerPos(i, 0.0, 0.0, 0.0); SpawnPlayer(i);
}
}
new string[128]; format(string,sizeof(string),"Administrator \"%s\" has spawned all players", pName(playerid) );
return SendClientMessageToAll(blue, string);
} else return SendClientMessage(playerid,red,"ERROR: You need to be level 4 to use this command");
}