Detect if a player is near the driver door. - 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: Detect if a player is near the driver door. (
/showthread.php?tid=517091)
Detect if a player is near the driver door. -
Lynn - 03.06.2014
So I've spent a fairly large amount of time trying how to do this on my own.
But I'm finally going to ask on here.
Does anyone know how they can detect if a player is standing next to a vehicles driver side door?
I had a few different ideas, but they quickly fell apart as they proved to be extremely inaccurate.
Thank you for anyone who can help.
Re: Detect if a player is near the driver door. -
iZN - 03.06.2014
JernejL provided every vehicle's offset, you can check it out:
https://sampforum.blast.hk/showthread.php?tid=164251
It will just require some mathematical calculations to get the position between player and vehicle's door offset.
Re: Detect if a player is near the driver door. -
Lynn - 03.06.2014
Quote:
Originally Posted by iZN
|
Thanks for sharing! That's going to help alot.
Re: Detect if a player is near the driver door. -
Vince - 03.06.2014
Or you could just use the native implementation:
https://sampwiki.blast.hk/wiki/GetVehicleModelInfo
Re: Detect if a player is near the driver door. -
Lynn - 03.06.2014
The link you posted does not have doors as a option.
I went ahead and used the first link provided, and figured out what I needed.
Thank you both for the help though. I'll +Rep when I'm able too again.