mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-19 16:06:02 +01:00
fix(client/vehicleProperties): Fix error on gameBuilds below 2372 (#417)
This commit is contained in:
@@ -114,6 +114,8 @@ AddStateBagChangeHandler('setVehicleProperties', '', function(bagName, _, value)
|
|||||||
end)
|
end)
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
local gameBuild = GetGameBuildNumber()
|
||||||
|
|
||||||
---@param vehicle number
|
---@param vehicle number
|
||||||
---@return VehicleProperties?
|
---@return VehicleProperties?
|
||||||
function lib.getVehicleProperties(vehicle)
|
function lib.getVehicleProperties(vehicle)
|
||||||
@@ -269,7 +271,7 @@ function lib.getVehicleProperties(vehicle)
|
|||||||
doors = damage.doors,
|
doors = damage.doors,
|
||||||
tyres = damage.tyres,
|
tyres = damage.tyres,
|
||||||
bulletProofTyres = GetVehicleTyresCanBurst(vehicle),
|
bulletProofTyres = GetVehicleTyresCanBurst(vehicle),
|
||||||
driftTyres = GetDriftTyresEnabled(vehicle),
|
driftTyres = gameBuild >= 2372 and GetDriftTyresEnabled(vehicle),
|
||||||
-- no setters?
|
-- no setters?
|
||||||
-- leftHeadlight = GetIsLeftVehicleHeadlightDamaged(vehicle),
|
-- leftHeadlight = GetIsLeftVehicleHeadlightDamaged(vehicle),
|
||||||
-- rightHeadlight = GetIsRightVehicleHeadlightDamaged(vehicle),
|
-- rightHeadlight = GetIsRightVehicleHeadlightDamaged(vehicle),
|
||||||
@@ -633,7 +635,7 @@ function lib.setVehicleProperties(vehicle, props, fixVehicle)
|
|||||||
SetVehicleTyresCanBurst(vehicle, props.bulletProofTyres)
|
SetVehicleTyresCanBurst(vehicle, props.bulletProofTyres)
|
||||||
end
|
end
|
||||||
|
|
||||||
if props.driftTyres then
|
if gameBuild >= 2372 and props.driftTyres then
|
||||||
SetDriftTyresEnabled(vehicle, true)
|
SetDriftTyresEnabled(vehicle, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user