Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: qbx_core support #160

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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