mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
fix(client/setVehicleProperties): force clear custom colours (#375)
This commit is contained in:
@@ -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])
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user