QBox Support
If you're running QBCore across QBX, you may need to make some adjustments to ensure seamless compatibility between the admin panel and the framework. Below, we'll guide you through the process of integrating Ultimate Admin Panel with QBox, ensuring a smooth experience for your server administration needs.
Client
To integrate Ultimate Admin Panel with QBox on the client-side, insert the following snippet at the end of the bridge/qb/client/functions.lua
file in your qbx_core
resource, before the return functions
statement:
-- Ultimate Admin Panel compatibility
UAPGetCoreObject = function()
return exports['qb-core']:GetCoreObject()
end
exports('GetCoreObject', UAPGetCoreObject)
After adding the snippet, the end of your file should look like this:
-- Ultimate Admin Panel compatibility
UAPGetCoreObject = function()
return exports['qb-core']:GetCoreObject()
end
exports('GetCoreObject', UAPGetCoreObject)
return functions
Server
To integrate Ultimate Admin Panel with QBox on the server-side, insert the following snippet at the end of the bridge/qb/server/functions.lua
file in your qbx_core
resource, before the return functions
statement:
-- Ultimate Admin Panel compatibility
UAPGetCoreObject = function()
local coreObject = exports['qb-core']:GetCoreObject()
local serverConfiguration = serverConfig or require 'config.server'.server
if not coreObject.Config then
coreObject.Config = {}
end
if not coreObject.Config.Server then
coreObject.Config.Server = {}
end
if not coreObject.Config.Server.Permissions then
coreObject.Config.Server.Permissions = serverConfiguration.permissions
end
return coreObject
end
exports('GetCoreObject', UAPGetCoreObject)
After adding the snippet, the end of your file should look like this:
-- Ultimate Admin Panel compatibility
UAPGetCoreObject = function()
local coreObject = exports['qb-core']:GetCoreObject()
local serverConfiguration = serverConfig or require 'config.server'.server
if not coreObject.Config then
coreObject.Config = {}
end
if not coreObject.Config.Server then
coreObject.Config.Server = {}
end
if not coreObject.Config.Server.Permissions then
coreObject.Config.Server.Permissions = serverConfiguration.permissions
end
return coreObject
end
exports('GetCoreObject', UAPGetCoreObject)
return functions
Don't forget to modify your framework name in your Ultimate Admin Panel config.lua
file as follows:
Config.FrameworkNames = {
qb = 'qbx_core' -- can be qbx-core on older versions
}