mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 02:01:33 +00:00
Merge pull request #935 from LRemp:main
bugfix: force clear vehicle custom colors before applying colors
This commit is contained in:
@@ -600,6 +600,7 @@ function QBCore.Functions.SetVehicleProperties(vehicle, props)
|
||||
end
|
||||
if props.color1 then
|
||||
if type(props.color1) == "number" then
|
||||
ClearVehicleCustomPrimaryColour(vehicle)
|
||||
SetVehicleColours(vehicle, props.color1, colorSecondary)
|
||||
else
|
||||
SetVehicleCustomPrimaryColour(vehicle, props.color1[1], props.color1[2], props.color1[3])
|
||||
@@ -607,6 +608,7 @@ function QBCore.Functions.SetVehicleProperties(vehicle, props)
|
||||
end
|
||||
if props.color2 then
|
||||
if type(props.color2) == "number" then
|
||||
ClearVehicleCustomSecondaryColour(vehicle)
|
||||
SetVehicleColours(vehicle, props.color1 or colorPrimary, props.color2)
|
||||
else
|
||||
SetVehicleCustomSecondaryColour(vehicle, props.color2[1], props.color2[2], props.color2[3])
|
||||
|
||||
Reference in New Issue
Block a user