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

where do i edit so the cars dont use so much fuel

even if this is a late response there are modifiers to change that aspect:

Config.ShowNearestGasStationOnly = true
Config.ShowAllGasStations = false

change those to

Config.ShowNearestGasStationOnly = false
Config.ShowAllGasStations = true

there are modifiers to change that aspect:

Config.ShowNearestGasStationOnly = true
Config.ShowAllGasStations = false

change those to

Config.ShowNearestGasStationOnly = false
Config.ShowAllGasStations = true

Has anyone had issues with helicopters and planes immediately acting like they are out of fuel?
We changed from FRFuel to this and anytime you get in an aircraft, it acts like it’s out of fuel even though the gauge is showing 70-80%

For the time being, I went and set all our emergency related helo’s to be exempt but would rather them require fuel so they don’t just stay up forever, but I need the fuel to work realistically and not just start out not being able to fly despite having plenty of fuel.

Alternatively, is it possible to just exempt those classes as a whole?

How do i add more categories for my addon cars?

anyone knows how i add jerrycan as item?

edit: took me 1hour to realize how to add it lol heres the code!
Steps: resources\LegacyFuel\source\fuel_server.lua
delete your code and paste the all this one

ESX = nil

if Config.UseESX then
	TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

	RegisterServerEvent('fuel:pay')
	AddEventHandler('fuel:pay', function(price)
		local xPlayer = ESX.GetPlayerFromId(source)
		local amount = ESX.Math.Round(price)

		if price > 0 then
			xPlayer.removeMoney(amount)
			xPlayer.addWeapon("weapon_petrolcan")
		end
	end)
end

Hi yes what you need to do is take the -master out of the name in the folder

Good day fellow legacyfuel users,

I’ve been trying to look at the scripts to find out where the engine starts to fail, but for the life of me I can’t find it.

It seems as though the car will try to go in reverse and stop you from going forward when you reach a certain fuel level, and I would like to edit and alter the way it works.

I’ve searched through all of the scripts and I can’t find anything that says anything about engine failure or what happens when fuel reaches a certain level. If anybody has any idea I would appreciate some help on this.

Thank you so much for your help

Can anyone link where or what code I can use to get the exact HUD Fuel Display (yellow bar) used in FRFuel please! Ive seen some posted but they are all bootleg

how to change the blip colour in map? from white to red?

1 Like

fuel_client.lua (12.1 KB)
Replace fuel_client.lua with this one and change the name of the blip on line 359 inside the Quotation mark (")

Is there any way I can use this script with the fuel hud from FRFuel?

i am trying to find the same thing, cant find it either

im trying to find where the code is for the car to fail, is anyone able to assist! cheers