Help script /rob /ar nearest player
#5

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:


Код:
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;
}
Reply


Messages In This Thread
Help script /rob /ar nearest player - by AmirRFCNR - 26.08.2014, 21:49
Re: Help script /rob /ar nearest player - by billy123321 - 27.08.2014, 00:37
Re: Help script /rob /ar nearest player - by Pottus - 27.08.2014, 00:51
Re: Help script /rob /ar nearest player - by Steel_ - 27.08.2014, 01:17
Re: Help script /rob /ar nearest player - by Ox1gEN - 27.08.2014, 02:10

Forum Jump:


Users browsing this thread: 1 Guest(s)