13.10.2012, 16:26
Then here:
And if you want a message saying that admin has frozen everyone then here:
PHP код:
CMD:freezeall(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
foreach (new i : Player)
{
if(PlayerInfo[i][pAdmin] < 1)
{
TogglePlayerControllable(i, 0);
}
}
return 1;
}
PHP код:
CMD:freezeall(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
foreach (new i : Player)
{
if(PlayerInfo[i][pAdmin] < 1))
{
TogglePlayerControllable(i, 0);
}
}
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname,sizeof(aname));
new string[60];
format(string,sizeof(string), "Admin %s has frozen everyone!", aname);
SendClientMessageToAll(-1, string);
return 1;
}