SA-MP Forums Archive
get nearest vehicle in front of you - 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: get nearest vehicle in front of you (/showthread.php?tid=363035)



get nearest vehicle in front of you - Jstylezzz - 26.07.2012

Hi everyone,

I have a function, that gets the nearest vehicle in range of the player.
What i want to do now, is get the nearest vehicle in front of the player..

Is there anyone who can think of a function like that??

Thanks in advance


Re: get nearest vehicle in front of you - Ranama - 26.07.2012

Maybe anyone of these could help you?

Код:
GetPlayerFacingAngle()
GetPlayerCameraFrontVector()
InterpolateCameraLookAt()
Mysqlif i don't know what they are used for, but it seems like they are used for get a players camera
At least GetPlayerFacingAngle() works, but i don't know how to check if the cars is in that area.


Re: get nearest vehicle in front of you - Jstylezzz - 26.07.2012

i will try something with those.. thanks
if anyone has a stock function, it would be great

thanks all