fix(client/vehicleproperties): reset colors when changing painttype (#692)

This commit is contained in:
Jag
2025-01-28 23:17:11 -08:00
committed by GitHub
parent 189306d5aa
commit 648a13f749

View File

@@ -343,7 +343,7 @@ function lib.setVehicleProperties(vehicle, props, fixVehicle)
ClearVehicleCustomPrimaryColour(vehicle) ClearVehicleCustomPrimaryColour(vehicle)
SetVehicleColours(vehicle, props.color1 --[[@as number]], colorSecondary --[[@as number]]) SetVehicleColours(vehicle, props.color1 --[[@as number]], colorSecondary --[[@as number]])
else 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]) SetVehicleCustomPrimaryColour(vehicle, props.color1[1], props.color1[2], props.color1[3])
end end
@@ -354,7 +354,7 @@ function lib.setVehicleProperties(vehicle, props, fixVehicle)
ClearVehicleCustomSecondaryColour(vehicle) ClearVehicleCustomSecondaryColour(vehicle)
SetVehicleColours(vehicle, props.color1 or colorPrimary --[[@as number]], props.color2 --[[@as number]]) SetVehicleColours(vehicle, props.color1 or colorPrimary --[[@as number]], props.color2 --[[@as number]])
else 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]) SetVehicleCustomSecondaryColour(vehicle, props.color2[1], props.color2[2], props.color2[3])
end end