Syncing Fuel POG

This should fix boats and other vehicles from not having fuel :)
Plus it syncs! <3
This commit is contained in:
WLVF
2022-09-01 22:52:32 -04:00
parent 7f153e72b2
commit 6a2e846f26

View File

@@ -598,6 +598,9 @@ CreateThread(function()
local pedVeh = GetVehiclePedIsIn(ped)
if pedVeh ~= 0 then
local vehClass = GetVehicleClass(pedVeh)
if not DecorExistOn(pedVeh, FUEL_DECOR) then
SetFuel(pedVeh, math.random(200, 800) / 10)
end
local fuel = GetFuel(pedVeh)
if fuel < 5.0 and GetIsVehicleEngineRunning(pedVeh) then
DisableControlAction(0, 71)
@@ -614,3 +617,8 @@ CreateThread(function()
CreateObject(GetHashKey(pumps.hash), pumps.x, pumps.y, pumps.z - 1.0, true, true, true)
end
end)
-- Register the fuel decor
CreateThread(function()
DecorRegister(FUEL_DECOR, 1)
end)