19.03.2015, 21:48
The thing I have noticed is the head and upper body actually detaching from the body, and raising to the top left corner of the player's screen when setting aim data. I believe this is due to an angle the NPC can't actually aim at, and therefore the upper body is forced to re-adjust(although it may just be a scripted bug).
Also do you realize every time the player updates if they are not in range of that point StopAim is called? That may very well be the issue, try using this stock in place of FCNPC_AimAt, and FCNPC_StopAim.
Also, try using zones. The best way is to use y_zones or streamer zones.
Also do you realize every time the player updates if they are not in range of that point StopAim is called? That may very well be the issue, try using this stock in place of FCNPC_AimAt, and FCNPC_StopAim.
pawn Код:
stock FCNPC_AimAtEx(playerid, Float: x, Float: y, Float: z, shoot)
{
if(FCNPC_AimAt(playerid, x, y, z, shoot)) Aiming[playerid] = true;
return 1;
}
pawn Код:
FCNPC_StopAimEx(playerid)
{
if(Aiming[playerid] == true) {
FCNPC_StopAim(playerid);
Aiming[playerid] = false;
}
return 1;
}