06.06.2010, 18:38
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:
|
I actually use 7 aiming points :P Did several test and i get almost a perfect accuracy with it.