mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
feat(es_extended): Support For Custom Xenon Colours
This commit is contained in:
@@ -692,6 +692,12 @@ function ESX.Game.GetVehicleProperties(vehicle)
|
||||
customPrimaryColor = {r, g, b}
|
||||
end
|
||||
|
||||
local customXenonColorR, customXenonColorG, customXenonColorB = GetVehicleXenonLightsCustomColor(vehicle)
|
||||
local customXenonColor = nil
|
||||
if customXenonColorR and customXenonColorG and customXenonColorB then
|
||||
customXenonColor = {customXenonColorR, customXenonColorG, customXenonColorB}
|
||||
end
|
||||
|
||||
local hasCustomSecondaryColor = GetIsVehicleSecondaryColourCustom(vehicle)
|
||||
local customSecondaryColor = nil
|
||||
if hasCustomSecondaryColor then
|
||||
@@ -771,6 +777,7 @@ function ESX.Game.GetVehicleProperties(vehicle)
|
||||
wheels = GetVehicleWheelType(vehicle),
|
||||
windowTint = GetVehicleWindowTint(vehicle),
|
||||
xenonColor = GetVehicleXenonLightsColor(vehicle),
|
||||
customXenonColor = customXenonColor,
|
||||
|
||||
neonEnabled = {IsVehicleNeonLightEnabled(vehicle, 0), IsVehicleNeonLightEnabled(vehicle, 1),
|
||||
IsVehicleNeonLightEnabled(vehicle, 2), IsVehicleNeonLightEnabled(vehicle, 3)},
|
||||
@@ -912,6 +919,10 @@ function ESX.Game.SetVehicleProperties(vehicle, props)
|
||||
if props.xenonColor then
|
||||
SetVehicleXenonLightsColor(vehicle, props.xenonColor)
|
||||
end
|
||||
if props.customXenonColor then
|
||||
SetVehicleXenonLightsCustomColor(vehicle, props.customXenonColor[1], props.customXenonColor[2],
|
||||
props.customXenonColor[3])
|
||||
end
|
||||
if props.modSmokeEnabled then
|
||||
ToggleVehicleMod(vehicle, 20, true)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user