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
8 Likes
Please download release of ox_lib and not the source code
Yea, just did, it works. Thank You!
1 Like