diff --git a/ulc/server/s_main.lua b/ulc/server/s_main.lua index c58e25c..a826f40 100644 --- a/ulc/server/s_main.lua +++ b/ulc/server/s_main.lua @@ -200,13 +200,24 @@ local function LoadExternalVehicleConfig(resourceName) TriggerEvent("ulc:error", '^1Could not load external configuration; data loaded from: "' .. resourceName .. '" was nil. ^0') return end - - if CheckData(f(), resourceName) then - print('^2Loaded external configuration for "' .. f().name .. '"^0') - table.insert(Config.Vehicles, f()) - else - TriggerEvent("ulc:error", '^1Could not load external configuration for "' .. f().name .. '"^0') + + -- NEW STUFF FOR MULTIPLE CONFIGS + local configs = {f()} + for _, v in pairs(configs) do + if CheckData(v, resourceName) then + print('^2Loaded external configuration for "' .. v.name .. '"^0') + table.insert(Config.Vehicles, v) + else + TriggerEvent("ulc:error", '^1Could not load external configuration for "' .. v.name .. '"^0') + end end + + -- if CheckData(f(), resourceName) then + -- print('^2Loaded external configuration for "' .. f().name .. '"^0') + -- table.insert(Config.Vehicles, f()) + -- else + -- TriggerEvent("ulc:error", '^1Could not load external configuration for "' .. f().name .. '"^0') + -- end end CreateThread(function ()