neearest airport show - 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: neearest airport show (
/showthread.php?tid=537384)
neearest airport show -
ManGoe - 15.09.2014
How to get the players nearest airport and set the mission there?
It always set mission like 1000-2000m far i want to set it to the nearest airport
And i also want the textdraw of it
please help +rep for helpers
Re: neearest airport show -
ManGoe - 16.09.2014
0 replies
it seems no one interested in helping
Re: neearest airport show -
PMH - 16.09.2014
get cordinates of all three airports
Use GetPlayerDistanceFromPoint and check which is the smallest one, then put player checkpoint to it
Re: neearest airport show -
WalterWhite - 16.09.2014
Quote:
Originally Posted by PMH
get cordinates of all three airports
Use GetPlayerDistanceFromPoint and check which is the smallest one, then put player checkpoint to it
|
This is indeed the most efficient way. Store them in an array called Airports or something along those lines and loop through them.
SA-MP doesn't really offer the ability to reference land marks straight off the bat in the script. To do this, you need to mark the points within the script as suggested above, and then go from there with the code.