[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 ox_target usage.

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

Repository
Download

Dependencies

ox_lib
ox_inventory

Optionals

ox_target

Getting vehicle fuel level

local fuel = GetVehicleFuelLevel(entity)
-- or Entity(entity).state.fuel

Set vehicle fuel level

Entity(entity).state.fuel = fuelAmount
28 Likes

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

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

1 Like

: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?

1 Like

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

1 Like

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

1 Like

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

1 Like

Interesting :blush:

Good job as always, keep up your work!

2 Likes