Log in to reply
 

Gas stations coordinates?



  • So, I've started a new script project, "NFS Vehicle Repair" which was requested by @aryan-manmeet. For that, I need locations for all the gas stations present in GTA 5. It would be awesome if you guys can post as many coordinates(doesn't need to be EXACTLY at the gas station, just around it, I can fine tine the correct coords later) using this mod.

    Thanks!

    These are the ones I found:
    X: -523.6914 Y:-1211.271 Z:17.92196


  • MODERATOR

    @AHK1221 This mod has them defined like so:

    local gasStations = {{-724, -935, 30},{-71, -1762, 30},{265, -1261, 30},{819, -1027, 30},{-2097, -320, 30},
    	{1212, 2657, 30},{2683, 3264, 30},{-2555, 2334, 30},{180, 6603, 30},{2581, 362, 30},
    	{1702, 6418, 30},{-1799, 803, 30},{-90, 6415, 30},{264, 2609, 30},{50, 2776, 30},
    	{2537, 2593, 30},{1182, -330, 30},{-526, -1212, 30},{1209, -1402, 30},{2005, 3775, 30},
    	{621, 269, 30},{-1434, -274, 30},{1687, 4929, 30}}
    

    Obviously the Z coords aren't correct but now you could easily get the ground Z coord using X and Y and write them to a file or something.



  • @Unknown-Modder Thanks!!!



  • @AHK1221 Just don't use the SHVDN World.GetGroundHeight() as it will give you the Z coordinate of any structures that are above those X & Y coordinates, instead of the actual ground height. It defaults the Z position to 1000 and you can't change it.

    Given that a lot of gas stations have a roof over the pumps, you might hit that problem a lot.

    I'd be tempted to use the Native, get the first height and then check again from 10 units below that, to see if you get another value returned as well.



  • @LeeC2202 I wasn't planning to use that, I was planning to use my "SUPER ULTRA AUTOMATED METHOD"....

    basically I'm just gonna go to every gas station and get the value manually.



  • @AHK1221 I actually thought the person who made the request was going to do that for you... or for whoever took up the request.



  • @LeeC2202 Who cares? Besides, then I don't have to wait for them to deliver. I can do it whenever I want :P



  • @LeeC2202 What if I don't need the Z coords... like what if I use DistanceTo2D? Also with some check to see if the car isn't in air. That would eliminate the use of the Z coordinate altogether.



  • @AHK1221 That would probably work fine. You'd just have to check there isn't any gas stations that are under a bridge or it might detect it if you were on the road above. It would also pass the "Car not in the air check" as well in that situation.



  • @LeeC2202 Oh yeah, I'll look out for that.


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.