From a9658e0eb82320a6c1f7457dbe5bbbcec96785cd Mon Sep 17 00:00:00 2001 From: AvarianKnight Date: Tue, 21 Apr 2020 13:42:07 -0500 Subject: [PATCH] add tank health --- client/functions.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/functions.lua b/client/functions.lua index 6cba9fe5..9ea73016 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -559,6 +559,7 @@ ESX.Game.GetVehicleProperties = function(vehicle) bodyHealth = ESX.Math.Round(GetVehicleBodyHealth(vehicle), 1), engineHealth = ESX.Math.Round(GetVehicleEngineHealth(vehicle), 1), + tankHealth = ESX.Math.Round(GetVehiclePetrolTankHealth(vehicle), 1), fuelLevel = ESX.Math.Round(GetVehicleFuelLevel(vehicle), 1), dirtLevel = ESX.Math.Round(GetVehicleDirtLevel(vehicle), 1), @@ -648,6 +649,7 @@ ESX.Game.SetVehicleProperties = function(vehicle, props) if props.plateIndex then SetVehicleNumberPlateTextIndex(vehicle, props.plateIndex) end if props.bodyHealth then SetVehicleBodyHealth(vehicle, props.bodyHealth + 0.0) end if props.engineHealth then SetVehicleEngineHealth(vehicle, props.engineHealth + 0.0) end + if props.tankHealth then SetVehiclePetrolTankHealth(vehicle, props.tankHealth + 0.0) end if props.fuelLevel then SetVehicleFuelLevel(vehicle, props.fuelLevel + 0.0) end if props.dirtLevel then SetVehicleDirtLevel(vehicle, props.dirtLevel + 0.0) end if props.color1 then SetVehicleColours(vehicle, props.color1, colorSecondary) end