21.09.2011, 16:50
pawn Код:
CMD:cuff(playerid, params[])
{
if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command.");
new giveplayerid, string[128];
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOUR_GREY, "Usage: /cuff [player id or name]");
if(Faction[playerid] != 1) return SendClientMessage(playerid, COLOUR_GREY, "You are not a member of the police.");
if(!IsPlayerNearPlayer(playerid, giveplayerid, 3.0))return SendClientMessage(playerid, COLOUR_GREY, "You must be close to the player to cuff them.");
{
ApplyAnimation(giveplayerid, "PED", "cower", 1, 1, 0, 0, 0, 0, 1);
TogglePlayerControllable(giveplayerid, 0);
format(string, sizeof(string), "Officer %s has placed handcuffs on %s", GetNameEx(playerid), GetNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE);
}
return 1;
}
Any help would be appreciated, + rep.