[FUNCTION] IsPlayerAimingAt
#6

Quote:
Originally Posted by niCe
Well, for better accuracy when detecting aiming at a player, I recommend creating 4 hitting zones instead of one with 1.1 radius.

E.g.:

Код:
stock IsPlayerAimingAtPlayer(playerid, targetid) {
 new Float:x, Float:y, Float:z;
 GetPlayerPos(target, x, y, z);
 if (IsPlayerAimingAt(playerid, x, y, z-0.75, 0.25)) return true;
 if (IsPlayerAimingAt(playerid, x, y, z-0.25, 0.25)) return true;
 if (IsPlayerAimingAt(playerid, x, y, z+0.25, 0.25)) return true;
 if (IsPlayerAimingAt(playerid, x, y, z+0.75, 0.25)) return true;
 return false;
}
Quote:
Originally Posted by MafiaGuy™
Can be used for one shot one kill
For this, it's still better to use instagib feature given by SA-MP. It will be more accurate and reliable than this function.
This function is very awesome. Thanks!

I actually use 7 aiming points :P Did several test and i get almost a perfect accuracy with it.
Reply


Messages In This Thread
[FUNCTION] IsPlayerAimingAt - by niCe - 10.04.2010, 13:19
Re: [FUNCTION] IsPlayerAimingAt - by MafiaGuy™ - 10.04.2010, 14:20
Re: [FUNCTION] IsPlayerAimingAt - by niCe - 10.04.2010, 14:32
Re: [FUNCTION] IsPlayerAimingAt - by ¤Adas¤ - 10.04.2010, 18:18
Re: [FUNCTION] IsPlayerAimingAt - by RyDeR` - 10.04.2010, 18:53
Re: [FUNCTION] IsPlayerAimingAt - by clavador - 06.06.2010, 18:38
Re: [FUNCTION] IsPlayerAimingAt - by ViruZZzZ_ChiLLL - 06.06.2010, 18:48
Re: [FUNCTION] IsPlayerAimingAt - by Luka P. - 06.06.2010, 19:21
Re: [FUNCTION] IsPlayerAimingAt - by markis95 - 07.06.2010, 13:11
AW: [FUNCTION] IsPlayerAimingAt - by Littl3j0hNy - 23.07.2010, 19:25

Forum Jump:


Users browsing this thread: 1 Guest(s)