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


#254

is possible to remove the Purple square that the text is on? so instead its just plain text without it?


#255

u just had a idea. think i did see it on a youtube video at some point.
is there anyway to add a “fuel truck” to this script like the Tanker trailer or something like that so you can drive around and refuel other cars or helicopters and stuff?
i have no idea where to start with this or if it even possible to implement in this script ?


#256

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


#257

Hi guys!

Is there any helis or boats refueling places?


#258

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


#259

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.


#260

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:


#261

We will love you forever! Love the script!


#262

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!!


#263

where are the airplanes gasoline pumps in map?


#264

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


#265

How to fix it ? can u help me?


#266

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


#267

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.


#268

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]


#269

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


#270

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


#271

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…


#272

THANKSSS! 20 char limit


#273

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