From 889196adf0ecc87c00cd09bfeaf6d05963b6e417 Mon Sep 17 00:00:00 2001 From: LRemp Date: Sun, 29 Jan 2023 17:20:25 +0200 Subject: [PATCH] bugfix: force clear vehicle custom colors before applying standart vehicle colors --- client/functions.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/functions.lua b/client/functions.lua index e9f2ca8..93aa104 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -605,6 +605,7 @@ function QBCore.Functions.SetVehicleProperties(vehicle, props) end if props.color1 then if type(props.color1) == "number" then + ClearVehicleCustomPrimaryColour(vehicle) SetVehicleColours(vehicle, props.color1, colorSecondary) else SetVehicleCustomPrimaryColour(vehicle, props.color1[1], props.color1[2], props.color1[3]) @@ -612,6 +613,7 @@ function QBCore.Functions.SetVehicleProperties(vehicle, props) end if props.color2 then if type(props.color2) == "number" then + ClearVehicleCustomSecondaryColour(vehicle) SetVehicleColours(vehicle, props.color1 or colorPrimary, props.color2) else SetVehicleCustomSecondaryColour(vehicle, props.color2[1], props.color2[2], props.color2[3])