New Website Sale - 15% OFF everything

⛽ Vehicle fuel

File Path: modules/systems/c.vehicleFuel.lua


Pre configured scripts

  • LegacyFuel
  • ps-fuel
  • ox_fuel
  • cd_fuel
  • custom

Auto detection of resource

By default, the script will try to automatically detect the correct resource.

Lua
Shared.VehicleFuel = "AUTO DETECT"

Auto detection failed

If auto detect failed in config.lua, set Shared.VehicleFuel to use the appropriate keys resource or set it to custom and configurate it yourself.


Custom functionality

Go to modules/systems/c.vehicleFuel.lua and customize your fuel logic

Lua
Core.SetVehicleFuel = function(vehicle, amount)
    SetVehicleFuelLevel(vehicle, formatFuel(amount)) -- custom or default
end