From a0bea87dfa006ce290f8fb1f1382ddab33a6bbac Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Sat, 20 Aug 2022 12:55:07 +1000 Subject: [PATCH] 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". --- resource/vehicleProperties/client.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/resource/vehicleProperties/client.lua b/resource/vehicleProperties/client.lua index 69308d5..2bc9fca 100644 --- a/resource/vehicleProperties/client.lua +++ b/resource/vehicleProperties/client.lua @@ -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