diff --git a/client/modules/frameworks/ox.lua b/client/modules/frameworks/ox.lua new file mode 100644 index 0000000..7d53e17 --- /dev/null +++ b/client/modules/frameworks/ox.lua @@ -0,0 +1,14 @@ +local Framework = {} + +local Ox = require '@ox_core.lib.init' + +---Checks if the user has the adequate group +---@param restrictions table +---@return boolean HasGroup +function Framework:HasGroup(restrictions) + local Player = Ox.GetPlayer() + + return Player.getGroup(restrictions) +end + +return Framework \ No newline at end of file diff --git a/shared/shared.lua b/shared/shared.lua index 632c3ca..a8d617a 100644 --- a/shared/shared.lua +++ b/shared/shared.lua @@ -25,6 +25,7 @@ end function GetFrameworkRequirePath() if IsResourceStarting('es_extended') then return 'esx' end + if IsResourceStarting('ox_core') then return 'qb' end if IsResourceStarting('qb-core') then return 'qb' end return 'standalone' end