Skip to content

Commit

Permalink
Merge pull request #14 from Maximus7474/ox-support
Browse files Browse the repository at this point in the history
feat: support for ox core
  • Loading branch information
Maximus7474 authored Jul 25, 2024
2 parents 1f2aa2e + cb9730e commit c1518d9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions client/modules/frameworks/ox.lua
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions shared/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c1518d9

Please sign in to comment.