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

I downloaded your fix and i still have overlapping.overlapping

is there a way to refuel boats and helicopters and planes??

1 Like

I also am looking into this. Only the lone invisible fuel pump at Higgin’s helitours seems to be able to fill up helicopters. I am trying to see if spawning more prop stations will allow more gas stations to show up on the map.

On my client, lots of gas pumps, the type at Harmony, Grapeseed, and Higgins are invisible to me, I cannot see or use them. :confused:

If anyone knows a fix, it would be greatly appreciated. <3

https://github.com/InZidiuZ/LegacyFuel/blob/master/LegacyFuel/client/main.lua#L11

I’ve seen this part but how to get the model code ? for example i wan’t to blacklist electrics vehicles i have the modelname: neon or cyclone but not the model code

Nice script, i really like it and so does my server it enhances rp further other than honking the horn to refuel, However is there any chance you can get this to work with vRP so people have to pay for fuel.

image

Somebody can help with that? it just happen when the person leave the car, they can press G to fuel the car but the message is so wird.

How to set the start fuel? When someone buy a car it will be 50 fuel for exaple?

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

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

Thanks :wink:

How does it works for boats?

so the script itself finds props that are gas pumps. Find or make a ymap where gas pump is stationed where a boat can reach it.

is there a way that i can make it so LEOs in esx can get free gas?

what line to change to remove the background of the text?

How can I disable all air craft from this? I know there is a blacklist, but what would I put in the black list to disable all aircraft at once?

Any idea why jerrycan filling is not working?
I’m not able to use jerrycan normally to spill the fuel on the ground as well … When I’m trying to use jerry can, it just drops it on the ground.
How to fix that?

Hi, script works nice but is there any option to implement that fuel status in esx_customui? Normally it was using getfuel from esx_AdvancedFuel.

CustomUI Code

Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
TriggerEvent(‘es:setMoneyDisplay’, 0.0)
ESX.UI.HUD.SetDisplay(0.0)
if isTalking == false then
if NetworkIsPlayerTalking(PlayerId()) then
isTalking = true
SendNUIMessage({action = “setTalking”, value = true})
end
else
if NetworkIsPlayerTalking(PlayerId()) == false then
isTalking = false
SendNUIMessage({action = “setTalking”, value = false})
end
end

	if inVehicle == false then
		if IsPedInAnyVehicle(GetPlayerPed(-1)) and GetPedInVehicleSeat(GetVehiclePedIsIn(GetPlayerPed(-1)), -1) == GetPlayerPed(-1) then
			inVehicle = true
			SendNUIMessage({action = "toggleCar", show = true})
		end
	else
		if IsPedInAnyVehicle(GetPlayerPed(-1)) and GetPedInVehicleSeat(GetVehiclePedIsIn(GetPlayerPed(-1)), -1) == GetPlayerPed(-1) then
			local essence = exports.esx_legacyfuel:CheckServerFuelTable()
			local percent = (essence/0.142)*100
			SendNUIMessage({action = "updateCarStatus", status = {{name = "gas", percent = percent}}})
		else
			inVehicle = false
			SendNUIMessage({action = "toggleCar", show = false})
		end
	end
end

end)

local essence = exports.esx_legacyfuel:CheckServerFuelTable()

Previously it was exports.esx_AdvancedFuel:getFuel() but I can’t find proper way to get it work with esx_LegacyFuel.

What is the name of function depended on “getting fuel” in LegacyFuel?

https://github.com/wowpanda/esx_customui

1 Like

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

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 ?