From 147ed7b8448b5809e83c78c2d993ba4d2da51049 Mon Sep 17 00:00:00 2001 From: ohscxr Date: Wed, 8 Feb 2023 15:12:30 -0500 Subject: [PATCH 1/2] feat(client/functions): Interior/Dashboard color saved in Vehicle Properties --- [core]/es_extended/client/functions.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index 240111c7..b37d4c9c 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -608,6 +608,8 @@ function ESX.Game.GetVehicleProperties(vehicle) local colorPrimary, colorSecondary = GetVehicleColours(vehicle) local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle) local hasCustomPrimaryColor = GetIsVehiclePrimaryColourCustom(vehicle) + local dashboardColor = GetVehicleDashboardColor(vehicle) + local interiorColor = GetVehicleInteriorColour(vehicle) local customPrimaryColor = nil if hasCustomPrimaryColor then customPrimaryColor = {GetVehicleCustomPrimaryColour(vehicle)} @@ -678,8 +680,12 @@ function ESX.Game.GetVehicleProperties(vehicle) customPrimaryColor = customPrimaryColor, customSecondaryColor = customSecondaryColor, + pearlescentColor = pearlescentColor, wheelColor = wheelColor, + + dashboardColor = dashboardColor, + interiorColor = interiorColor, wheels = GetVehicleWheelType(vehicle), windowTint = GetVehicleWindowTint(vehicle), @@ -792,6 +798,15 @@ function ESX.Game.SetVehicleProperties(vehicle, props) if props.pearlescentColor ~= nil then SetVehicleExtraColours(vehicle, props.pearlescentColor, wheelColor) end + + if props.interiorColor ~= nil then + SetVehicleInteriorColor(vehicle, props.interiorColor) + end + + if props.dashboardColor ~= nil then + SetVehicleDashboardColor(vehicle, props.dashboardColor) + end + if props.wheelColor ~= nil then SetVehicleExtraColours(vehicle, props.pearlescentColor or pearlescentColor, props.wheelColor) end From 330f245495fdd8cf92bf9b0c0172621400a954a8 Mon Sep 17 00:00:00 2001 From: ohscxr Date: Wed, 8 Feb 2023 15:22:05 -0500 Subject: [PATCH 2/2] Remove blank space --- [core]/es_extended/client/functions.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index b37d4c9c..0df14068 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -680,7 +680,6 @@ function ESX.Game.GetVehicleProperties(vehicle) customPrimaryColor = customPrimaryColor, customSecondaryColor = customSecondaryColor, - pearlescentColor = pearlescentColor, wheelColor = wheelColor,