Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion ulc/server/s_main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,17 @@ local function LoadExternalVehicleConfig(resourceName)
if not data then
data = LoadResourceFile(resourceName, "ulc.lua")
if not data then
-- Check if user accidentally created ulc.lua.txt instead of ulc.lua
local txtFileData = LoadResourceFile(resourceName, "data/ulc.lua.txt")
if not txtFileData then
txtFileData = LoadResourceFile(resourceName, "ulc.lua.txt")
end

if txtFileData then
TriggerEvent("ulc:error", '^1Found "ulc.lua.txt" file in resource: "' .. resourceName .. '". You need to rename it to "ulc.lua" (without the .txt extension). Make sure file extensions are visible in your file explorer.^0')
return
end

print("Error loading 'ulc.lua' file. Make sure it is at the root of your resource or in the 'data' folder.")
TriggerEvent("ulc:error", '^1Could not load external configuration in: "' .. resourceName .. '"^0')
return
Expand Down Expand Up @@ -368,7 +379,7 @@ CreateThread(function()
for k, v in ipairs(Config.ExternalVehResources) do
local resourceState = GetResourceState(v)
while resourceState == "starting" do
print("^3[ULC] Waiting for resource: " .. resourceName .. " to load.")
print("^3[ULC] Waiting for resource: " .. v .. " to load.")
Wait(100)
end
LoadExternalVehicleConfig(v)
Expand Down