12.08.2014, 15:20
hi guys, i want to make this script to freeze only players that doesnt have admin levels:
PHP код:
CMD:freezeall(playerid, params[])
{
if(pInfo[playerid][pAdminLevel] < 3) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
foreach (new i : Player)
{
if(pInfo[playerid][pAdminLevel] >= 0)
{
TogglePlayerControllable(i, 0);
}
}
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname,sizeof(pname));
new string[60];
format(string,sizeof(string), "{FF0000}Admin %s {FFFFFF} has frozen everyone!", pname);
SendClientMessageToAll(-1, string);
return 1;
}