Skip to content

Commit

Permalink
fix(client/vehicleproperties): reset colors when changing painttype (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jag3dagster authored Jan 29, 2025
1 parent 189306d commit 648a13f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resource/vehicleProperties/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ function lib.setVehicleProperties(vehicle, props, fixVehicle)
ClearVehicleCustomPrimaryColour(vehicle)
SetVehicleColours(vehicle, props.color1 --[[@as number]], colorSecondary --[[@as number]])
else
if props.paintType1 then SetVehicleModColor_1(vehicle, props.paintType1, colorPrimary, pearlescentColor) end
if props.paintType1 then SetVehicleModColor_1(vehicle, props.paintType1, 0, props.pearlescentColor or 0) end

SetVehicleCustomPrimaryColour(vehicle, props.color1[1], props.color1[2], props.color1[3])
end
Expand All @@ -354,7 +354,7 @@ function lib.setVehicleProperties(vehicle, props, fixVehicle)
ClearVehicleCustomSecondaryColour(vehicle)
SetVehicleColours(vehicle, props.color1 or colorPrimary --[[@as number]], props.color2 --[[@as number]])
else
if props.paintType2 then SetVehicleModColor_2(vehicle, props.paintType2, colorSecondary) end
if props.paintType2 then SetVehicleModColor_2(vehicle, props.paintType2, 0) end

SetVehicleCustomSecondaryColour(vehicle, props.color2[1], props.color2[2], props.color2[3])
end
Expand Down

0 comments on commit 648a13f

Please sign in to comment.