mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
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:
@@ -71,13 +71,9 @@ function lib.getVehicleProperties(vehicle)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local neons = {}
|
local neons = {}
|
||||||
local neonCount = 0
|
|
||||||
|
|
||||||
for i = 0, 3 do
|
for i = 0, 3 do
|
||||||
if IsVehicleNeonLightEnabled(vehicle, i) then
|
neons[i + 1] = IsVehicleNeonLightEnabled(vehicle, i)
|
||||||
neonCount += 1
|
|
||||||
neons[neonCount] = i
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -258,7 +254,7 @@ function lib.setVehicleProperties(vehicle, props)
|
|||||||
|
|
||||||
if props.neonEnabled then
|
if props.neonEnabled then
|
||||||
for i = 1, #props.neonEnabled do
|
for i = 1, #props.neonEnabled do
|
||||||
SetVehicleNeonLightEnabled(vehicle, props.neonEnabled[i], true)
|
SetVehicleNeonLightEnabled(vehicle, i - 1, props.neonEnabled[i])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user