fix(client/setVehicleProperties): force clear custom colours (#375)

This commit is contained in:
Lukas Brūzga authored and GitHub committed 2023-07-23 13:14:44 +10:00
1 parent 588d26c421
commit f641881243
1 file changed
+2
+2
View File
@@ -304,6 +304,7 @@ function lib.setVehicleProperties(vehicle, props)
if props.color1 then
if type(props.color1) == 'number' then
ClearVehicleCustomPrimaryColour(vehicle)
SetVehicleColours(vehicle, props.color1 --[[@as number]], colorSecondary --[[@as number]])
else
SetVehicleCustomPrimaryColour(vehicle, props.color1[1], props.color1[2], props.color1[3])
@@ -312,6 +313,7 @@ function lib.setVehicleProperties(vehicle, props)
if props.color2 then
if type(props.color2) == 'number' then
ClearVehicleCustomPrimaryColour(vehicle)
SetVehicleColours(vehicle, props.color1 or colorPrimary --[[@as number]], props.color2 --[[@as number]])
else
SetVehicleCustomSecondaryColour(vehicle, props.color2[1], props.color2[2], props.color2[3])