Files
ox_lib/resource/init.lua

28 lines
717 B
Lua
Raw Normal View History

local debug_getinfo = debug.getinfo
lib = setmetatable({
name = 'ox_lib',
context = IsDuplicityVersion() and 'server' or 'client',
}, {
__newindex = function(self, name, fn)
rawset(self, name, fn)
if debug_getinfo(2, 'S').short_src:find('@ox_lib/resource') then
exports(name, fn)
end
end
})
2022-04-17 18:22:19 +02:00
cache = {
resource = lib.name
}
if not LoadResourceFile(lib.name, 'web/build/index.html') then
2022-10-28 18:26:27 +11:00
local err = '^1Unable to load UI. Build ox_lib or download the latest release.\n ^3https://github.com/overextended/ox_lib/releases/latest/download/ox_lib.zip^0'
function lib.hasLoaded() return err end
error(err)
end
2022-10-28 18:26:27 +11:00
function lib.hasLoaded() return true end