Jump to content

[V|REL/WIP] Fuel Script


sakis25

Recommended Posts

brandon246

Jarycans for fuel on the go...

 

+1: Ability for player to have jerry cans which also run out of fuel, allowing you to fill them up at the Gas Station and store them in your trunk. Only a specific amount is allowed in your trunk depending on the size of the vehicle itself.

 

xD

Edited by brandon246
Link to comment
Share on other sites

alteredbeast

It works well now with the last version. The only thing is that the gas is dropping a little too fast. Anyway, good work !

Link to comment
Share on other sites

manu90mala

great! a must have for a more realistic GTA experience. Hope to have adjustable fuel consumption and fuel prices

Link to comment
Share on other sites

Can you add this gas station too? it is on the highway..

 

here is a picture of the map..

 

dh8paXk.jpg

Link to comment
Share on other sites

@FunGt great video, thank you!

 

Here is another one:

 

 

 

@gta5mods and @Royal22 thank you for the locations. I will add them in the next update.

Also I want to make the jerry can useful but I have to make sure how it works first.

Link to comment
Share on other sites

Here's some more stations.


[Extra Fuel Stations]


E1- Tataviam Mts: Palomino Fwy (X: 2575.896 Y: 358.902 Z: 108.020)

E2- Mt Chiliad (X: 1702.343 Y: 6418.502 Z: 32.206)

E3- Richman Glen (X: -1803.408 Y: 803.413 Z: 138.082)

E4- Paleto Bay: Paleto Bay Blvd (X: -95.595 Y: 6415.134 Z: 31.044)

E5- Harmony (X: 264.116 Y: 2609.259 Z: 44.408) [Truck Stop]

E6- Grand Senora Desert (X: 49.800 Y: 2776.189 Z: 57.448)

E7- Ron Alternates Wind Farm (X: 2537.558 Y: 2593.450 Z: 37.509) [Truck Stop]

E8- Mirror Park (X: 1179.030 Y: -333.291 Z: 68.740)

E9- Little Seoul (X: -525.974 Y: -1203.198 Z: 17.795)

E10- El Burro Heights (X: 1204.966 Y: -1397.354 Z: 34.788)

E11- Sandy Shores (X: 2004.289 Y: 3770.912 Z: 31.44)

E12- Grapeseed: Grapeseed Ave (X: 1686.338 Y: 4930.874 Z: 41.642)

E13- Downtown Vinewood (X: 622.917 Y: 264.745 Z: 102.653)


vYwrwIo.jpg

Edited by Daxwolf
Link to comment
Share on other sites

@Daxwolf you just made my day! Thank you for the locations. I will try to add them all in the next update.

Link to comment
Share on other sites

Here's another.

 

E14- Morningwood (X: -1434.485 Y: -282.782 Z: 45.771)

 

BbpgfnJ.png

Link to comment
Share on other sites

Hey sakis, just wanted to say thanks for your awesome Fuel Mod bro...luv'n this sh*t!

Link to comment
Share on other sites

function GUI.renderGUI()
GRAPHICS.DRAW_RECT(gasx+(carGas/2), gasy, carGas, gash, 149, 77, 211, 255);
end

 

I thkink this RGB setting suits fuel meter better. (purple color like one that GPS uses)

Link to comment
Share on other sites

So I added and tested all the coordinates of the stations I found. Those other coordinates could work to place blips later on though.

 

B5iJd5K.jpg

                        --10				if (coords.x>2566 and coords.x<2597 and coords.y > 350 and coords.y < 374) then					refillCar =true				end			--11				if (coords.x>1680 and coords.x< 1716 and coords.y > 6406 and coords.y < 6434) then					refillCar =true				end			--12				if (coords.x>-1816 and coords.x<-1780 and coords.y > 788 and coords.y < 817) then					refillCar =true				end			--13				if (coords.x>-105 and coords.x<-83  and coords.y > 6417 and coords.y < 6421) then					refillCar=true				end			--14				if (coords.x>258 and coords.x<269 and coords.y > 2599 and coords.y < 2614) then					refillCar =true				end			--15				if (coords.x>41 and coords.x< 62 and coords.y > 2769 and coords.y < 2785) then					refillCar =true				end			--16					if (coords.x>2533 and coords.x<2540 and coords.y > 2589 and coords.y < 2600) then					refillCar =true				end			--17				if (coords.x>1171 and coords.x<1192 and coords.y > -345 and coords.y < -314) then					refillCar =true				end			--18				if (coords.x>-542 and coords.x<-504 and coords.y > -1221 and coords.y < -1202) then					refillCar =true				end			--19				if (coords.x>1197 and coords.x<1220 and coords.y > -1412 and coords.y < -1395) then					refillCar =true				end			--20			    if (coords.x>1995 and coords.x<2017 and coords.y > 3760 and coords.y < 3787) then					refillCar =true				end			--21				if (coords.x>1680 and coords.x<1701 and coords.y > 4915 and coords.y < 4943) then					refillCar =true				end			--22				if (coords.x>606 and coords.x<635 and coords.y > 259 and coords.y < 278) then					refillCar =true				end			--23				if (coords.x>-1445 and coords.x<-1409 and coords.y > -301 and coords.y < -251) then					refillCar =true				end
Edited by Daxwolf
  • Like 2
Link to comment
Share on other sites

 

So I added and tested all the coordinates of the stations I found. Those other coordinates could work to place blips later on though.

This is completely awesome! Thanks man!

Link to comment
Share on other sites

Awesome mod, loving it so far. Is it possible to slow down the rate of gas consumption by chance? Trying to make it last like 50% longer.

 

If not no worries though, thanks for the mod and keep up the awesome work!

Link to comment
Share on other sites

a suggestion would be instead of sounding the horm you simply stop near a gas pump and it will show the text press (key) to refuel

or do it automatically

i also think you could make the gas meter much more subtle thinner closer to the minimap with a gasoline symbol next to it

Link to comment
Share on other sites

it works well, but it might need a few tweaks, for instance bicycles consume fuel.. =P

Link to comment
Share on other sites

NEW VERSION 0.4 IS NOW AVAILABLE!

I was about to release version 0.3 yesterday but then I got a message from haws1290 who send me over the code for the blips on the map. Then I saw Daxwolf's post with his locations on the map who also helped me a lot.
A big thanks to those guys and the rest of the community who helped with this mod.

What's new in this version:

- Added 14 new petrol stations, 23 in total (thanks to Daxwolf)
- Added blips with the available petrol stations (thanks to haws1290)
- When you run low on gas all the petrol stations are shown on the map, also fuel bar turns red
- Added a darker background behind the fuel bar
- Bug fixes


So what's next:
- Make it possible to refill your car using the jerry can. At the moment I can't find a way to check what weapon is the player currently holding so I can't make it work yet.
- Also I can't check if the player is in a car or bycicle or boat etc. So all the vehicles you are driving will drain fuel.

Edited by sakis25
Link to comment
Share on other sites

CaioRobertoBR

Nice work sakis25 , my game is more realistic now , continues to improve the mod increasingly please , thank you.

Link to comment
Share on other sites

headscript

NEW VERSION 0.4 IS NOW AVAILABLE!

I was about to release version 0.3 yesterday but then I got a message from haws1290 who send me over the code for the blips on the map. Then I saw Daxwolf's post with his locations on the map who also helped me a lot.

A big thanks to those guys and the rest of the community who helped with this mod.

 

What's new in this version:

- Added 14 new petrol stations, 23 in total (thanks to Daxwolf)

- Added blips with the available petrol stations (thanks to haws1290)

- When you run low on gas all the petrol stations are shown on the map, also fuel bar turns red

- Added a darker background behind the fuel bar

- Bug fixes

So what's next:

- Make it possible to refill your car using the jerry can. At the moment I can't find a way to check what weapon is the player currently holding so I can't make it work yet.

- Also I can't check if the player is in a car or bycicle or boat etc. So all the vehicles you are driving will drain fuel.

 

those work :)

  • Like 2
Link to comment
Share on other sites

 

:^: man you're heart of gold.

 

 

@Sakis25

Neat update! Thanks for all the hard work to you, Daxwolf and Haws!

Would be great if you could make nearest gas station blip always visible, or make them all on/off by a keypress, like shift+z. Also configurable fuel consumption would be a cool think, right now I'm running out of fuel too fast (playing with a police mods, and just ended up with empty tank in the middle of police chase somewhere in the desert haha :miranda: )

 

UPD:

Can you please add hiding fuel bar if radar is off? Here's a function:

I've tried to add it myself, but it didn't worked.

Edited by Xilandro
Link to comment
Share on other sites

XXLpeanuts

Hi man, loving the mod but can you make a hotkey that disables it on the fly because i am trying to do a mission with a plane and i crash every time because i run out of fuel. I also think fuel drains far too quick, but otherwise mods great.

Link to comment
Share on other sites

@headscript I tried "IS_THIS_MODEL_A_BICYCLE(Hash model)" but it always returns "false" even when I'm on a bicycle. Can you try it and see if it works?

 

@Xilandro thank you for the code. I'll try it latter.

 

Note to mods: Please edit the title of this thread and remove the "0.1" because it causes confusion.

Link to comment
Share on other sites

 

NEW VERSION 0.4 IS NOW AVAILABLE!

I was about to release version 0.3 yesterday but then I got a message from haws1290 who send me over the code for the blips on the map. Then I saw Daxwolf's post with his locations on the map who also helped me a lot.

A big thanks to those guys and the rest of the community who helped with this mod.

 

What's new in this version:

- Added 14 new petrol stations, 23 in total (thanks to Daxwolf)

- Added blips with the available petrol stations (thanks to haws1290)

- When you run low on gas all the petrol stations are shown on the map, also fuel bar turns red

- Added a darker background behind the fuel bar

- Bug fixes

So what's next:

- Make it possible to refill your car using the jerry can. At the moment I can't find a way to check what weapon is the player currently holding so I can't make it work yet.

- Also I can't check if the player is in a car or bycicle or boat etc. So all the vehicles you are driving will drain fuel.

 

those work :)

 

Great find!

Hope Sakis use them for the mod :lol:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.