05.08.2011, 17:23
pawn Код:
dcmd_freezeall(playerid,params[]) {
#pragma unused params
if(IsPlayerCommandLevel(playerid,"freezeall")) {
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) TogglePlayerControllable(i,false);
#pragma unused params
if(IsPlayerCommandLevel(playerid,"unfreezeall")) {
SendCommandMessageToAdmins(playerid,"UNFREEZEALL");
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) TogglePlayerControllable(i,true);
new string[256],name[24]; GetPlayerName(playerid,name,24); format(string,256,"Administrator \"%s\" unfrozen everyone.",name); return SendClientMessage(playerid,yellow,string);
} else return SendLevelErrorMessage(playerid,"unfreezeall");
}
} // <------------------- HERE