Skip to content

Commit 12eefc3

Browse files
authored
Merge pull request #1149 from jrgrimshaw/patch-1
Force tankHealth & oilLevel to be float values to fix leaking issue
2 parents c7e8aa9 + afb8eab commit 12eefc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/functions.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ function QBCore.Functions.SetVehicleProperties(vehicle, props)
566566
SetVehicleEngineHealth(vehicle, props.engineHealth + 0.0)
567567
end
568568
if props.tankHealth then
569-
SetVehiclePetrolTankHealth(vehicle, props.tankHealth)
569+
SetVehiclePetrolTankHealth(vehicle, props.tankHealth + 0.0)
570570
end
571571
if props.fuelLevel then
572572
SetVehicleFuelLevel(vehicle, props.fuelLevel + 0.0)
@@ -575,7 +575,7 @@ function QBCore.Functions.SetVehicleProperties(vehicle, props)
575575
SetVehicleDirtLevel(vehicle, props.dirtLevel + 0.0)
576576
end
577577
if props.oilLevel then
578-
SetVehicleOilLevel(vehicle, props.oilLevel)
578+
SetVehicleOilLevel(vehicle, props.oilLevel + 0.0)
579579
end
580580
if props.color1 then
581581
if type(props.color1) == 'number' then

0 commit comments

Comments
 (0)