mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
fix(client/vehicleproperties): reset colors when changing painttype (#692)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user