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

I have this problem were the script works but the text doesn’t show up on the pump i’m at.


But then if I drive away and come back it doesn’t work

i cant even get into the server. it stays failed handshake to server htp 524 error

it wont let me connect to the Legacy server and told me to contact the server creater can someone help ASAP please

What?

has anyone made a command to fuel the vehicle and to have it for admins only?

its propbably because of GTA Sync, same like mechanic job or any thing that require client to server update, whoever fix the car have to get in first to sync the veh health to server.

By the way, is there anyone that figure out how to slow down refueling? current pace are quite fast …

You could do something like this…

RegisterCommand(‘fuel’, function()
local playerPed = PlayerPedId()
local vehicle = GetVehiclePedIsIn(playerPed, false)
SetVehicleFuelLevel(vehicle, 100.0)
end)

Is this the best way? probably not. not sure about permissions.

Hey! appreciate any of the small help, unfortunately that gives an error with “attempt to call a nil value (global ‘PlayerPedId’)”

Interesting, seems to be working fine for me?

I was told to ask here how I can stop vehicles from spawning with almost zero gas using LegacyFuel?

You want to go to the Function ManageFuleUsage(vehicle) in client_main
you should see "SetFuel(vehicle, math.random(200, 800) / 10

The SetFuel function is randomizing between 200 & 800 fuel in your tank on spawn, I personally switched this to 500 & 1000 so that you spawn with half tank to full tank. Give that a try.

thank you, will definitely try that!