Fix changing vehicle extra to false not working

Logic switched value to true. Fixed.
This commit is contained in:
Nick Reagan
2025-01-29 20:00:24 -05:00
parent e488cbe61e
commit 723b03aefb
+5 -1
View File
@@ -77,7 +77,11 @@ function QBShared.SetDefaultVehicleExtras(vehicle, config)
end
for id, enabled in pairs(config) do
QBShared.ChangeVehicleExtra(vehicle, tonumber(id), type(enabled) == 'boolean' and enabled or true)
if type(enabled) ~= 'boolean' then
enabled = true
end
QBShared.ChangeVehicleExtra(vehicle, tonumber(id), enabled)
end
end