tweak(shared): prepare for globbing

This commit is contained in:
BerkieBb
2022-02-18 19:15:05 +01:00
committed by GitHub
parent f82fb1a118
commit d09db11082
+3 -3
View File
@@ -1,4 +1,4 @@
QBShared = {}
QBShared = QBShared or {}
local StringCharset = {}
local NumberCharset = {}
@@ -18,7 +18,7 @@ QBShared.RandomInt = function(length)
end
QBShared.SplitStr = function(str, delimiter)
local result = { }
local result = {}
local from = 1
local delim_from, delim_to = string.find(str, delimiter, from)
while delim_from do
@@ -66,7 +66,7 @@ QBShared.SetDefaultVehicleExtras = function (vehicle, config)
end
for id, enabled in pairs(config) do
QBShared.ChangeVehicleExtra(vehicle, tonumber(id), true)
QBShared.ChangeVehicleExtra(vehicle, tonumber(id), type(enabled) == 'boolean' and enabled or true)
end
end