[Release] [ESX & Non-ESX] LegacyFuel system

i would assume you add the gas can into your shop then user buys it then he/she can fill gas can.

1 Like

Found something with ESX.

When you park your car in the esx garage and want to take it out again the fuel is empty everytime.
Do the cars spawn with an empty fueltank maybe?

When you first spawn your car in the garage it has fuel, if you put it back and retake it out, then it’s at 0%
something should be made that if the car is not found, then it has 50% gaz

2 Likes

This 0% gas problem is dumb…
Even if i put this :slight_smile:

		TriggerServerEvent('LegacyFuel:CheckServerFuelTable', plate)
		SetVehicleFuelLevel(callback_vehicle, 50)
		TriggerServerEvent('LegacyFuel:UpdateServerFuelTable', plate, round(GetVehicleFuelLevel(callback_vehicle), 1))```

inside of my eden_garage SpawnVehicle function it change nothing, the stupid vehicle spawn with 0% …
anyone found a fix ?

Have the same problem. Also wanted to have a fix for that :smiley:

Since we have no gas can. Need to implement one now i think :smiley:

Nice job, but the cars don’t save the fuel. If they got out of the garage they have now fuel. Maybe include a buy petrolcan funktion on gas station, please.

Is there an option to set the “start gas / fuel”?

Update

Sorry for taking so long, been really busy lately! I’ve updated the script so the 0% @ garages doesn’t happen anymore (it shouldn’t, atleast). Will add the requested features when I get more time.

1 Like

working great with the garages now. Thanks. Cant fill car with jerry cans yet.

You can if you have one, but haven’t added any places to buy/get them

Hey dude, your job is awesome, really.

However, i have a strange bug. When i take out my vehicle, i’ve a chance to have 0% fuel in.

I dont know how? I tried to resolve it but i failed xD

I appreaciate that you think so! :smile:

However, the bug you’re talking about should’ve been fixed around a week ago. Try to download the latest version from the github page and see if the issue still occurs after you’ve updated the script.

1 Like

So, do you carry around a 15 gallon gas can with you irl? A real Jerry Can is typically about 5 gallons. So filling up your car with one just isn’t legit. @InZidiuZ, don’t change that.

By the way, GREAT script. Keep it up. Only do what you want to do to it, don’t try to please everyone. You’ll go nutz.

1 Like

Refueling with a jerry can has always been a thing, I just haven’t updated the github with the version that includes the abiliy to buy one.

Hey!

Nice update! 0% fuel has been corrected!

Just a little suggestion! I added in vehicle blacklist the “forklift” and the “bus”.

The “forklift” has always the fuel! :stuck_out_tongue:
It dont work! :stuck_out_tongue:

The HUD is awesome! Great work!

1 Like

Yeah im having issues adding models to the blacklisting fuel as well…some take some dont.

Hi there guys,

I noticed that this resource adds the fuel system to both boats and aircraft but I’m not sure how to handle fueling of these since the script checks for “nearPump” and I can’t seem to find any pumps to park the craft near for fueling.

Anyone else run into this and solve it?

The pumps at the heli area by the boat docks work just fine if you can get close enough…I ended up adding some easier accessible pumps for boats and helis around the map.

1 Like

Can I ask how you add pumps? I’d love to do that!

We add them when building custom ymaps.