- There is no exports for get and set fuel, you can get fuel calling this:
local vehicle = GetPlayersLastVehicle()
local fuel = Entity(vehicle).state.fuel or GetVehicleFuelLevel(vehicle)
- If you want to set fuel for a car call this:
Entity(vehicle).state.fuel = fuelAmount
Add items in ox_inventory\data\items.lua
['jerrycan_petrol'] = {
label = 'Petrol Can',
weight = 2500,
stack = false,
close = true,
client = {
export = 'esegovic_fuel_system.jerrycan_petrol'
}
},
['jerrycan_diesel'] = {
label = 'Diesel Can',
weight = 2500,
stack = false,
close = true,
client = {
export = 'esegovic_fuel_system.jerrycan_diesel'
}
}
Download the latest releases and put them in your resources
folder.
This script is based on:
- fivem-react-boilerplate-lua (Check Docs if you want to edit the script)
Need further support? Join our Discord!