mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +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)
|
||||
]]
|
||||
|
||||
local gameBuild = GetGameBuildNumber()
|
||||
|
||||
---@param vehicle number
|
||||
---@return VehicleProperties?
|
||||
function lib.getVehicleProperties(vehicle)
|
||||
@@ -269,7 +271,7 @@ function lib.getVehicleProperties(vehicle)
|
||||
doors = damage.doors,
|
||||
tyres = damage.tyres,
|
||||
bulletProofTyres = GetVehicleTyresCanBurst(vehicle),
|
||||
driftTyres = GetDriftTyresEnabled(vehicle),
|
||||
driftTyres = gameBuild >= 2372 and GetDriftTyresEnabled(vehicle),
|
||||
-- no setters?
|
||||
-- leftHeadlight = GetIsLeftVehicleHeadlightDamaged(vehicle),
|
||||
-- rightHeadlight = GetIsRightVehicleHeadlightDamaged(vehicle),
|
||||
@@ -633,7 +635,7 @@ function lib.setVehicleProperties(vehicle, props, fixVehicle)
|
||||
SetVehicleTyresCanBurst(vehicle, props.bulletProofTyres)
|
||||
end
|
||||
|
||||
if props.driftTyres then
|
||||
if gameBuild >= 2372 and props.driftTyres then
|
||||
SetDriftTyresEnabled(vehicle, true)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user