Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.importClass = function(t)
- if type(t) == 'table' then
- for _,className in pairs(t) do
- if IsDuplicityVersion() then
- local f,err = load(LoadResourceFile('fg-base', "server/classes/"..className..".lua"))
- if f then
- f()
- end
- else
- local f,err = load(LoadResourceFile('fg-base', "client/classes/"..className..".lua"))
- f()
- end
- end
- elseif type(t) == 'string' then
- if t == '*' then
- if IsDuplicityVersion() then
- -- servers-ide
- importClass {
- 'fgcore',
- 'exports',
- 'getuser',
- }
- else
- -- -- client-side
- -- import {
- -- 'none'
- -- }
- end
- else
- importClass {t}
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement