Get the ID of the nearest vehicle!
#1

The title says all, exist any form to Get the ID of the nearest vehicle? A Stock? Function? Thanks.
Reply
#2

http://forum.sa-mp.com/showpost.php?...13&postcount=3
Reply
#3

however you like to call the algorithm, you have to use a linear search through all vehicles, checking and comparing the closest one, excluding the vehicleid you're sitting in indeed.
i would first script it as stock, then ocassionally transform it into a public callback, in case you want to call it from another filterscirpt, but then you could also use a stock in an .include file...
edit: wtf it took me 3 minutes to type this?
Reply
#4

Thanks! Can close it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)