Skip to content

Commit

Permalink
feat: qbx_core support (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
solareon authored Aug 14, 2024
1 parent 361bbd1 commit 0a0e51a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/framework/qbx.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if not lib.checkDependency('qbx_core', '1.18.0', true) then return end

local QBX = exports.qbx_core
local utils = require 'client.utils'

---@diagnostic disable-next-line: duplicate-set-field
function utils.hasPlayerGotGroup(filter)
return QBX:HasGroup(filter)
end
2 changes: 2 additions & 0 deletions client/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ SetTimeout(0, function()
require 'client.framework.ox'
elseif utils.hasExport('es_extended.getSharedObject') then
require 'client.framework.esx'
elseif utils.hasExport('qbx_core.HasGroup') then
require 'client.framework.qbx'
elseif utils.hasExport('ND_Core.getPlayer') then
require 'client.framework.nd'
end
Expand Down
1 change: 1 addition & 0 deletions fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ files {
'client/framework/nd.lua',
'client/framework/ox.lua',
'client/framework/esx.lua',
'client/framework/qbx.lua',
'client/compat/qtarget.lua',
}

Expand Down

0 comments on commit 0a0e51a

Please sign in to comment.