mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
Add neon support for ESX.Game.GetVehicleProperties and ESX.Game.SetVehicleProperties
This commit is contained in:
@@ -599,6 +599,13 @@ ESX.Game.GetVehicleProperties = function(vehicle)
|
|||||||
wheels = GetVehicleWheelType(vehicle),
|
wheels = GetVehicleWheelType(vehicle),
|
||||||
windowTint = GetVehicleWindowTint(vehicle),
|
windowTint = GetVehicleWindowTint(vehicle),
|
||||||
|
|
||||||
|
neonEnabled = {
|
||||||
|
IsVehicleNeonLightEnabled(vehicle, 0),
|
||||||
|
IsVehicleNeonLightEnabled(vehicle, 1),
|
||||||
|
IsVehicleNeonLightEnabled(vehicle, 2),
|
||||||
|
IsVehicleNeonLightEnabled(vehicle, 3)
|
||||||
|
}
|
||||||
|
|
||||||
neonColor = table.pack(GetVehicleNeonLightsColour(vehicle)),
|
neonColor = table.pack(GetVehicleNeonLightsColour(vehicle)),
|
||||||
|
|
||||||
modSpoilers = GetVehicleMod(vehicle, 0),
|
modSpoilers = GetVehicleMod(vehicle, 0),
|
||||||
@@ -665,6 +672,13 @@ ESX.Game.SetVehicleProperties = function(vehicle, props)
|
|||||||
SetVehicleWindowTint(vehicle, props.windowTint)
|
SetVehicleWindowTint(vehicle, props.windowTint)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if props.neonEnabled ~= nil then
|
||||||
|
SetVehicleNeonLightEnabled(vehicle, 0, props.neonEnabled[1]),
|
||||||
|
SetVehicleNeonLightEnabled(vehicle, 1, props.neonEnabled[2]),
|
||||||
|
SetVehicleNeonLightEnabled(vehicle, 2, props.neonEnabled[3]),
|
||||||
|
SetVehicleNeonLightEnabled(vehicle, 3, props.neonEnabled[4])
|
||||||
|
end
|
||||||
|
|
||||||
if props.neonColor ~= nil then
|
if props.neonColor ~= nil then
|
||||||
SetVehicleNeonLightsColour(vehicle, props.neonColor[1], props.neonColor[2], props.neonColor[3])
|
SetVehicleNeonLightsColour(vehicle, props.neonColor[1], props.neonColor[2], props.neonColor[3])
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user