Merge pull request #1846 from seltonmt012/fix/vehicle-secondary-colour

fix(esx_lib/game): keep the secondary colour when the primary is custom
This commit is contained in:
_Not_
2026-08-14 19:36:09 -05:00
committed by GitHub
+1 -1
View File
@@ -462,7 +462,7 @@ function xLib.game.setVehicleProperties(vehicle, props)
if type(props.color2) == "table" then if type(props.color2) == "table" then
SetVehicleCustomSecondaryColour(vehicle, props.color2[1], props.color2[2], props.color2[3]) SetVehicleCustomSecondaryColour(vehicle, props.color2[1], props.color2[2], props.color2[3])
else else
SetVehicleColours(vehicle, props.color1 or colorPrimary, props.color2) SetVehicleColours(vehicle, type(props.color1) == "number" and props.color1 or colorPrimary, props.color2)
end end
end end
if props.pearlescentColor ~= nil then if props.pearlescentColor ~= nil then