Skip to content

Commit

Permalink
ox fuel support
Browse files Browse the repository at this point in the history
  • Loading branch information
trclassic92 committed Sep 27, 2024
1 parent 1146b6e commit ba4ca5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions client/cl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ RegisterNetEvent('tr-lumberjack:client:deliverytruck', function()
SetVehicleNumberPlateText(JobVehicle, truckPlate)
SetVehicleHasBeenOwnedByPlayer(JobVehicle, true)
SetEntityAsMissionEntity(JobVehicle, true, true)
exports[Config.fuel]:SetFuel(JobVehicle, 100.0)
if Config.fuel == "ox" then
Entity(JobVehicle).state.fuel = 100.0
else
exports[Config.fuel]:SetFuel(JobVehicle, 100.0)
end
local id = NetworkGetNetworkIdFromEntity(JobVehicle)

DoScreenFadeOut(1500)
Expand Down Expand Up @@ -137,7 +141,11 @@ RegisterNetEvent('tr-lumberjack:client:workvan', function()
SetVehicleNumberPlateText(JobVehicle, vanPlate)
SetVehicleHasBeenOwnedByPlayer(JobVehicle, true)
SetEntityAsMissionEntity(JobVehicle, true, true)
exports[Config.fuel]:SetFuel(JobVehicle, 100.0)
if Config.fuel == "ox" then
Entity(JobVehicle).state.fuel = 100.0
else
exports[Config.fuel]:SetFuel(JobVehicle, 100.0)
end
local id = NetworkGetNetworkIdFromEntity(JobVehicle)

DoScreenFadeOut(1500)
Expand Down
2 changes: 1 addition & 1 deletion shared/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Config.progress = "qbcore" -- Options: qbcore, ox
Config.menu = "qbcore" -- Options: qbcore, ox

-- Fuel System
Config.fuel = "cdn-fuel" -- Export for fuel script
Config.fuel = "cdn-fuel" -- Export for fuel script (if using ox just put "ox")

-- Blips
Config.useBlips = true -- true = Enabled, false = Disabled
Expand Down

0 comments on commit ba4ca5c

Please sign in to comment.