[Free] Ox Fuel

Simplistic fuel resource utilizing statebags made for use with ox_inventory.

Fueling both via pump or petrol can is supported, refill and usage values are highly customizable within the config file as well as optional qtarget usage.

While electric vehicles are listed separately in the config file they currently behave the same as gas vehicles.




While ox_inventory is currently a hard dependency, there are plans to support QBCore and ESX in the near future.



Getting vehicle fuel level

local fuel = GetVehicleFuelLevel(entity)

Or you can do so using statebags:

local fuel = Entity(entity).state.fuel

:ox: :ox: :ox: :ox:

:ox: :ox: :ox: :ox:

:ox: :ox: :ox: :ox:

:ox: :ox: :ox: :ox:

1 Like

Please download release of ox_lib and not the source code

Yea, just did, it works. Thank You!

1 Like

Does this script work with LegacyFuel?

If we don’t use ESX or QBCore or any framework how would we be able to use this?

This was specifically made to replace LegacyFuel for people using ox_inventory, which is why it doesn’t even support base ESX.

Even when I do ESX and QB support, what’s wrong with LegacyFuel for your needs?

1 Like

D1sXOig.jpg (1459×1077) (imgur.com)
After death, I was reborn in the hospital, I press E and I get a message, you can no longer buy a canister of gasoline. In fact, I died next to the gas station, and the script works out the procedure for buying a canister.

Open an issue on the GitHub repository

any vids on this please

i didn’t tried it but im sure ITS AWEEEEEEEESOME :star_struck: like the other ox Resources :smiling_face_with_three_hearts:

Again amazing job!! Thx guys for yours works :ox:

how to work cosmo_hud with ?

Should just work out of the box

Interesting :blush:

Good job as always, keep up your work!