27.08.2014, 02:10
This ~!WAS NOT!~ tested but should work correctly.
If a player is in range of 4 meters within another player it'll cuff him, otherwise it'll write that no one's there.
CODE:
If a player is in range of 4 meters within another player it'll cuff him, otherwise it'll write that no one's there.
CODE:
Код:
CMD:arrest(playerid, params[])
{
new Float:x, Float:y, Float:z;
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(i, 4,x, y, z))
{
SetPlayerSpecialAction(i, SPECIAL_ACTION_CUFFED);
SetPlayerAttachedObject(i, 0, 19418, 6, -0.027999, 0.051999, -0.030000, -18.699926, 0.000000, 104.199928, 1.489999, 3.036000, 1.957999);
EditAttachedObject(i, 0);
}
else
{
SendClientMessage(playerid, -1, "There's no one around you!");
}
}
return 1;
}

