12.08.2011, 06:16
pawn Код:
CMD:cuff(playerid,params[])
{
new id,string[128], Float:X, Float:Y, Float:Z;
if(sscanf(params, "u",id)) return SendClientMessage(playerid,COLOR_RED,"Usage: /cuff [ID]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"Error: Player Not Connected!");
GetPlayerPos(id, X, Y, Z);
if(!IsPlayerInRangeOfPoint(playerid, 3.0, X, Y, Z)) return SendClientMessage(playerid, -1, "You're not in range of that player!");
///
format(string, sizeof(string), "You Were Cuffed");
GameTextForPlayer(playerid, string, 500, 4);
TogglePlayerControllable(id,0);
return 1;
}