mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
Syncing Fuel POG
This should fix boats and other vehicles from not having fuel :) Plus it syncs! <3
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user