22.09.2013, 15:22
pawn Код:
CMD:freeze(playerid,params[])
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"USAGE: /freeze [playerid]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"ERROR: Invalid playerid");
TogglePlayerControllable(id,0);
GameTextForPlayer(id,"~r~frozen",4000,4);
return 1;
}
CMD:unfreeze(playerid,params[])
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"USAGE: /unfreeze [playerid]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"ERROR: Invalid playerid");
TogglePlayerControllable(id,1);
GameTextForPlayer(id,"~r~unfrozen",4000,4);
return 1;
}
CMD:unfreezeall(playerid,params[])
{
foreach(new i:Player)
{
TogglePlayerControllable(i,1);
GameTextForPlayer(i,"~r~unfrozen",4000,4);
}
return 1;
}
CMD:freezeall(playerid,params[])
{
foreach(new i:Player)
{
TogglePlayerControllable(i,0);
GameTextForPlayer(i,"~r~frozen",4000,4);
}
return 1;
}