Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PRegiments = {}
- if SERVER then
- include("pregiments/configuration/sh_configuration.lua")
- AddCSLuaFile("pregiments/configuration/sh_configuration.lua")
- local fileTable = {
- ["cl_"] = {_G["AddCSLuaFile"]},
- ["sv_"] = {_G["include"]},
- ["sh_"] = {_G["include"], _G["AddCSLuaFile"]}
- }
- for index, folder in pairs(select(2, file.Find("pregiments/*", "LUA"))) do
- if folder == "configuration" then continue end
- for _, luaFile in pairs(select(1, file.Find("pregiments/"..folder.."/*", "LUA"))) do
- for prefix, addTable in pairs(fileTable) do
- if prefix != string.sub(luaFile, 0, 3) then continue end
- for j, addFunc in pairs(addTable) do
- local luaFile = "pregiments/"..folder.."/"..luaFile
- addFunc(luaFile)
- end
- end
- end
- end
- end
- if CLIENT then
- include("pregiments/configuration/sh_configuration.lua")
- local fileTable = {
- ["cl_"] = {_G["include"]},
- ["sh_"] = {_G["include"]}
- }
- for index, folder in pairs(select(2, file.Find("pregiments/*", "LUA"))) do
- if folder == "configuration" then continue end
- for _, luaFile in pairs(select(1, file.Find("pregiments/"..folder.."/*", "LUA"))) do
- for prefix, addTable in pairs(fileTable) do
- if prefix != string.sub(luaFile, 0, 3) then continue end
- for j, addFunc in pairs(addTable) do
- local luaFile = "pregiments/"..folder.."/"..luaFile
- addFunc(luaFile)
- end
- end
- end
- end
- end
- print("Poseidon Regiments Successfully Loaded!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement