SA-MP Forums Archive
How do you get a bullet's impact position? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How do you get a bullet's impact position? (/showthread.php?tid=442692)



How do you get a bullet's impact position? - SlonCHL - 08.06.2013

How to get a bullet's impact position? I'm trying to make an exploding bullet, I need the XYZ position for CreateExplosion. Does anyone here know how to make one, I've search for "GetPlayerCameraFrontVector" but IDK how to use it. I want something like https://sampforum.blast.hk/showthread.php?tid=266187 but I do not want to teleport, I just want to get the position

EDIT
And BTW can I ask, when we close the server, does OnFilterScriptExit gets called? If yes, have the server cleaned all the player variables(PVars). I need to know it for my user account system, I want to save the user stats on OnFilterScriptExit?


Re: How do you get a bullet's impact position? - Mauzen - 08.06.2013

This is a fully released filterscript. If you want something specific, just take a look at that script and use the stuff you need, do it yourself. Life isnt a candy bar, you wont always get free sweeties just because you ask for them (unless youre asking strangers in vans)


Re: How do you get a bullet's impact position? - SlonCHL - 08.06.2013

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
This is a fully released filterscript. If you want something specific, just take a look at that script and use the stuff you need, do it yourself. Life isnt a candy bar, you wont always get free sweeties just because you ask for them (unless youre asking strangers in vans)
I do not understand how GetPlayerCameraFrontVector works and his math in his filterscript. I'm a beginner here, I will appreciate if someone will explain how these works and how to get the position. I've tried analyzing his script 3 times and I still do not understand anything

EDIT
Since you do not want to answer my first question, can you at least answer this

Quote:
Originally Posted by SlonCHL
Посмотреть сообщение
And BTW can I ask, when we close the server, does OnFilterScriptExit gets called? If yes, have the server cleaned all the player variables(PVars). I need to know it for my user account system, I want to save the user stats on OnFilterScriptExit?
Thank you


Re: How do you get a bullet's impact position? - SlonCHL - 09.06.2013

Ok, I have it working but I don't know how to get the bullet's impact position, I can only get the position of my front camera view, not the distance from my front camera to an object. I can only create an object at a fix range right in front of my cross hair


Re: How do you get a bullet's impact position? - SlonCHL - 09.06.2013

Hello? Can anyone help?