10.04.2010, 14:32
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.:
For this, it's still better to use instagib feature given by SA-MP. It will be more accurate and reliable than this function.
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
|

