mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Livery backwards compatibility
This commit is contained in:
@@ -328,6 +328,12 @@ function QBCore.Functions.GetVehicleProperties(vehicle)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if GetVehicleMod(vehicle, 48) == -1 and GetVehicleLivery(vehicle) ~= -1 then
|
||||||
|
modLivery = GetVehicleLivery(vehicle)
|
||||||
|
else
|
||||||
|
modLivery = GetVehicleMod(vehicle, 48)
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
model = GetEntityModel(vehicle),
|
model = GetEntityModel(vehicle),
|
||||||
plate = Trim(GetVehicleNumberPlateText(vehicle)),
|
plate = Trim(GetVehicleNumberPlateText(vehicle)),
|
||||||
@@ -401,7 +407,7 @@ function QBCore.Functions.GetVehicleProperties(vehicle)
|
|||||||
modTrimB = GetVehicleMod(vehicle, 44),
|
modTrimB = GetVehicleMod(vehicle, 44),
|
||||||
modTank = GetVehicleMod(vehicle, 45),
|
modTank = GetVehicleMod(vehicle, 45),
|
||||||
modWindows = GetVehicleMod(vehicle, 46),
|
modWindows = GetVehicleMod(vehicle, 46),
|
||||||
modLivery = GetVehicleLivery(vehicle),
|
modLivery = modLivery,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
@@ -618,6 +624,7 @@ function QBCore.Functions.SetVehicleProperties(vehicle, props)
|
|||||||
SetVehicleMod(vehicle, 46, props.modWindows, false)
|
SetVehicleMod(vehicle, 46, props.modWindows, false)
|
||||||
end
|
end
|
||||||
if props.modLivery then
|
if props.modLivery then
|
||||||
|
SetVehicleMod(vehicle, 48, props.modLivery, false)
|
||||||
SetVehicleLivery(vehicle, props.modLivery)
|
SetVehicleLivery(vehicle, props.modLivery)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user