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

is there an way to disable boates? Cause choppers don’t lose fuel, it it possible to do the same with boates?

Hi guys!

Is there any helis or boats refueling places?

I would just add gas pumps to docs / airports the script goes off objects so it’s pretty easy

No I think you would need to create sadly, I haven’t seen any updates on this source for quite some time. Believe its most likely abandoned.

Sort of, just haven’t had time to do any updates on it. I’ll probably end up doing a rewrite of it as it’s quite messy, if I find the time… we’ll see :wink:

3 Likes

We will love you forever! Love the script!

2 Likes

2 questions can i disable on planes? And how can i reduce the fuel consume here:
rpmfuelusage = fuel - rpm / 7.4
Citizen.Wait(15000)
Thanks for any help!!

where are the airplanes gasoline pumps in map?

Fantastic resource. I just wish it was accurate with gas gauges…maybe we will get an update someday.

How to fix it ? can u help me?

Here you go esx_legacyfuel will now use petroltankvolume from handling line of said car. So if you have sexyspeedometer it will sync properly with the gauge. Credit to sexyspeedometer because i have use his line of code and transferred it to esx_legacyfuel.

The code is

Citizen.InvokeNative(0x642FC12F, vehicle, "CHandlingData", "fPetrolTankVolume", Citizen.ReturnResultAnyway(), Citizen.ResultAsFloat()) It will also show L instead of %.

Download here

1 Like

I read through the comments but I’m still unable to configure default fuel level to 80% when job vehicles are spawned. Any assistance would be appreciated.

in

				integer = math.random(300, 500)
				fuel 	= integer / 10

				table.insert(Vehicles, {plate = plate, fuel = fuel})

				TriggerServerEvent('LegacyFuel:UpdateServerFuelTable', plate, fuel)
			end

			SetVehicleFuelLevel(vehicle, fuel)
		end```

[/quote]

1 Like

in integer = math.random(300, 500) you change to integer = math.random(500, 700)

1 Like

Thank you @Shyricaus, I appreciate you taking the time to educate me.

So, mine was at 200, 800, I changed it to 600, 800, and my fishing boat had 70% fuel when i left the dock. 10 seconds after driving i was at 10%…

Also, I added a waypoint that does appear on my map at a very low dock but unable to get boat to refuel at it…

THANKSSS! 20 char limit

Suggestion: Add the ability to add customs spawn codes to allow them to fuel up other vehicles and have a normal fuel limit.

is it possible to add the update to the normal non esx version :slight_smile: i have tried to play around with a fix with the natives but wont work for me :S

Yes i can have a look at it. Should be doable. Will you be able to test it?