mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
fix modLivery not saving
This commit is contained in:
@@ -724,7 +724,7 @@ function ESX.Game.GetVehicleProperties(vehicle)
|
|||||||
modTrimB = GetVehicleMod(vehicle, 44),
|
modTrimB = GetVehicleMod(vehicle, 44),
|
||||||
modTank = GetVehicleMod(vehicle, 45),
|
modTank = GetVehicleMod(vehicle, 45),
|
||||||
modDoorR = GetVehicleMod(vehicle, 47),
|
modDoorR = GetVehicleMod(vehicle, 47),
|
||||||
modLivery = GetVehicleMod(vehicle, 48),
|
modLivery = GetVehicleLivery(vehicle),
|
||||||
modLightbar = GetVehicleMod(vehicle, 49),
|
modLightbar = GetVehicleMod(vehicle, 49),
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -820,25 +820,26 @@ function ESX.Game.SetVehicleProperties(vehicle, props)
|
|||||||
if props.modWindows then SetVehicleMod(vehicle, 46, props.modWindows, false) end
|
if props.modWindows then SetVehicleMod(vehicle, 46, props.modWindows, false) end
|
||||||
|
|
||||||
if props.modLivery then
|
if props.modLivery then
|
||||||
SetVehicleMod(vehicle, 48, props.modLivery, false)
|
SetVehicleLivery(vehicle, props.modLivery)
|
||||||
end
|
end
|
||||||
|
|
||||||
if props.windowsBroken then
|
if props.windowsBroken then
|
||||||
for k, v in pairs(props.windowsBroken) do
|
for k, v in pairs(props.windowsBroken) do
|
||||||
if v then SmashVehicleWindow(vehicle, tonumber(k)) end
|
if v then SmashVehicleWindow(vehicle, tonumber(k)) end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if props.doorsBroken then
|
if props.doorsBroken then
|
||||||
for k, v in pairs(props.doorsBroken) do
|
for k, v in pairs(props.doorsBroken) do
|
||||||
if v then SetVehicleDoorBroken(vehicle, tonumber(k), true) end
|
if v then SetVehicleDoorBroken(vehicle, tonumber(k), true) end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if props.tyreBurst then
|
if props.tyreBurst then
|
||||||
for k, v in pairs(props.tyreBurst) do
|
for k, v in pairs(props.tyreBurst) do
|
||||||
if v then SetVehicleTyreBurst(vehicle, tonumber(k), true, 1000.0) end
|
if v then SetVehicleTyreBurst(vehicle, tonumber(k), true, 1000.0) end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user