2022-05-06 16:37:36 +10:00
lib = setmetatable ({
2022-09-14 00:50:27 +10:00
name = 'ox_lib' ,
context = IsDuplicityVersion () and 'server' or 'client' ,
2022-05-06 16:37:36 +10:00
}, {
2021-12-30 02:25:00 +11:00
__newindex = function ( self , name , fn )
2021-11-16 19:37:36 +11:00
exports ( name , fn )
2021-12-30 02:25:00 +11:00
rawset ( self , name , fn )
2021-11-16 19:37:36 +11:00
end
2022-02-28 00:49:44 +00:00
})
2022-04-17 18:22:19 +02:00
2022-09-14 00:50:27 +10:00
cache = {
resource = lib.name
}
2022-05-06 16:37:36 +10:00
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 )
2022-04-29 03:02:28 +10:00
end
2022-10-28 18:26:27 +11:00
function lib . hasLoaded () return true end