Skip to content

Commit

Permalink
fix(client/setVehicleProperties): force clear custom colours (overext…
Browse files Browse the repository at this point in the history
  • Loading branch information
LRemp authored Jul 23, 2023
1 parent 588d26c commit f641881
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions resource/vehicleProperties/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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])
Expand Down

0 comments on commit f641881

Please sign in to comment.