Closed Sasino97 closed 5 years ago
Thats the way its supposed to be, there is no ColAndreas to check if there is anything in between. And if there was ColAndreas you still would not be able to detect vehicles and players (basically any dynamic entity)
The function handling the shooting is this one.
@WoutProvost yeah you are right, but still it will be pretty inaccurate (like everything in samp) since animations and bones positions are not taken into account, not to mention lag. Its not FCNP's fault its just limits of samp and reason why many people left it, including me.
Yes, it's not perfect indeed.
On the topic of that shoot function btw, there are some things that are not taken into account. I'll fix that later.
I'll answer the topic discussed in the original post.
The reason players don't take damage is because the player damage system is handled by SA-MP and not the plugin. The NPC shoots at the player, SA-MP detects that there is something in between, so the player doesn't receive damage.
The reason NPCs do take damage is because the NPC damage system is handled by the plugin and not SA-MP. The NPC shoots at the other NPC, the plugin can't (fully) check if there is something in between, so the NPC does receive damage.
I'm working on some code to slightly improve the shooting mechanics. I'll create a pull request when it is finished.
Using FCNPC_AimAt with shoot=true, with another FCNPC as target, the bullet will reach the target NPC no matter what is in between.
http://forum.sa-mp.com/showthread.php?p=4016722&posted=1#post4016722