Freeze Command
#3

Try this

Код:
CMD:freeze(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return GameTextForPlayer(playerid, "~r~error~w~:only admins can use this command!",3000,3);
else
{
new
pname[MAX_PLAYER_NAME],
string[128],
reason[50],
giveplayerid;
GetPlayerName(playerid, pname,sizeof(pname));
if(sscanf(params,"rs[50]",giveplayerid,reason)) return GameTextForPlayer(playerid, "~r~error~w~:/freeze (playerid) (reason)",2000,3);
else if(!IsPlayerConnected(giveplayerid)||giveplayerid == INVALID_PLAYER_ID) return GameTextForPlayer(playerid, "~r~error~w~:This player isn't connected!",3000,3);
else
{
format(string,sizeof(string),"ADMIN FREEZE: %s has been freezed by an administrator(Reason: %s)",pname,reason);
SendClientMessageToAll(COLOR_PINK, string);
TogglePlayerControllable(giveplayerid, 0);
GameTextForPlayer(giveplayerid,"~r~FROZEN",3000,3);
}
}
return 1;
}
Maybe i have helped you
Reply


Messages In This Thread
Freeze Command - by NexySamp - 07.07.2015, 22:41
Re: Freeze Command - by JimmyCh - 07.07.2015, 23:01
Re: Freeze Command - by KingServerIRAN - 07.07.2015, 23:14

Forum Jump:


Users browsing this thread: 1 Guest(s)