fix(client/vehicleProperties): store neons as an array

People normally complain about the most nonsensical non-issues; yet
this one was completely left alone; or more specifically, one person
attributed the issue to ox_lib but didn't bother to report the issue or
provide a fix, instead just
complaining that "ox_lib is constantly updating".
This commit is contained in:
Linden
2022-08-20 12:55:07 +10:00
parent 6cf29ac0eb
commit a0bea87dfa

View File

@@ -71,13 +71,9 @@ function lib.getVehicleProperties(vehicle)
end
local neons = {}
local neonCount = 0
for i = 0, 3 do
if IsVehicleNeonLightEnabled(vehicle, i) then
neonCount += 1
neons[neonCount] = i
end
neons[i + 1] = IsVehicleNeonLightEnabled(vehicle, i)
end
return {
@@ -258,7 +254,7 @@ function lib.setVehicleProperties(vehicle, props)
if props.neonEnabled then
for i = 1, #props.neonEnabled do
SetVehicleNeonLightEnabled(vehicle, props.neonEnabled[i], true)
SetVehicleNeonLightEnabled(vehicle, i - 1, props.neonEnabled[i])
end
end