mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
Revert "Revamped GetVehicleProperties in compatible with the removal of customPrimay and secondary colors"
This reverts commit 9b0ffead47.
This commit is contained in:
@@ -805,19 +805,14 @@ function ESX.Game.GetVehicleProperties(vehicle)
|
||||
return
|
||||
end
|
||||
|
||||
local colorPrimary, colorSecondary = GetVehicleColours(vehicle) ---@type number | number[], number | number[]
|
||||
local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
|
||||
local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
|
||||
local hasCustomPrimaryColor = GetIsVehiclePrimaryColourCustom(vehicle)
|
||||
local hasCustomSecondaryColor = GetIsVehicleSecondaryColourCustom(vehicle)
|
||||
local dashboardColor = GetVehicleDashboardColor(vehicle)
|
||||
local interiorColor = GetVehicleInteriorColour(vehicle)
|
||||
|
||||
local customPrimaryColor = nil
|
||||
if hasCustomPrimaryColor then
|
||||
colorPrimary = { GetVehicleCustomPrimaryColour(vehicle) }
|
||||
end
|
||||
|
||||
if hasCustomSecondaryColor then
|
||||
colorSecondary = { GetVehicleCustomSecondaryColour(vehicle) }
|
||||
customPrimaryColor = { GetVehicleCustomPrimaryColour(vehicle) }
|
||||
end
|
||||
|
||||
local hasCustomXenonColor, customXenonColorR, customXenonColorG, customXenonColorB = GetVehicleXenonLightsCustomColor(vehicle)
|
||||
@@ -826,6 +821,12 @@ function ESX.Game.GetVehicleProperties(vehicle)
|
||||
customXenonColor = { customXenonColorR, customXenonColorG, customXenonColorB }
|
||||
end
|
||||
|
||||
local hasCustomSecondaryColor = GetIsVehicleSecondaryColourCustom(vehicle)
|
||||
local customSecondaryColor = nil
|
||||
if hasCustomSecondaryColor then
|
||||
customSecondaryColor = { GetVehicleCustomSecondaryColour(vehicle) }
|
||||
end
|
||||
|
||||
local extras = {}
|
||||
for extraId = 0, 20 do
|
||||
if DoesExtraExist(vehicle, extraId) then
|
||||
@@ -878,6 +879,8 @@ function ESX.Game.GetVehicleProperties(vehicle)
|
||||
dirtLevel = ESX.Math.Round(GetVehicleDirtLevel(vehicle), 1),
|
||||
color1 = colorPrimary,
|
||||
color2 = colorSecondary,
|
||||
customPrimaryColor = customPrimaryColor,
|
||||
customSecondaryColor = customSecondaryColor,
|
||||
|
||||
pearlescentColor = pearlescentColor,
|
||||
wheelColor = wheelColor,
|
||||
|
||||
Reference in New Issue
Block a user