Skip to content

Client Exports ​

These are the client exports of the original qbx_management. Scripts that use them keep working. The server always checks that the player is a boss of the job or gang before the tablet opens.

OpenBossMenu

Opens the boss tablet of the player's job, or the gang tablet of the player's gang.

lua
exports.qbx_management:OpenBossMenu(groupType)
NameTypeRequiredNotes
groupType'job', 'gang' or nilNo'job' or nil opens the job tablet, 'gang' opens the gang tablet
lua
exports.qbx_management:OpenBossMenu('job')
exports.qbx_management:OpenBossMenu('gang')

A job name also works (the qb-management / esx_society style). It opens that job's tablet when the player is a boss there:

lua
exports.qbx_management:OpenBossMenu('police', nil, { wash = false })

The third argument hides tablet sections. Keys: checkBal, withdraw, deposit, wash, employees, salary, grades (all true when left out). To limit what a player can really do, use the server export.

Returns true when the request was sent. A player who is not a boss gets "You do not manage a business." (or "You do not manage a gang.").

AddBossMenuItem / AddGangMenuItem

Adds your own button to the sidebar of the boss tablet. Clicking it runs your event.

lua
local id = exports.qbx_management:AddBossMenuItem({
    id = 'company_reports',
    title = 'Company reports',
    event = 'my_resource:openReports',
    args = { source = 'bossmenu' },
})
FieldTypeNotes
idstringOptional. Made for you when left out
titlestringButton text (label or name also work)
eventstringThe event to run (also read from params.event)
argstableSent with the event (also read from params.args)
isServerbooleantrue runs event as a server event (also read from params.isServer)

AddGangMenuItem takes the same table. The item's args.type is set to 'job' or 'gang' when you leave it out.

Returns the item id, or false when the argument is not a table.

Added items show as buttons in every boss and gang tablet the player opens.

RemoveBossMenuItem / RemoveGangMenuItem

Removes an item added with AddBossMenuItem or AddGangMenuItem.

lua
exports.qbx_management:RemoveBossMenuItem('company_reports')
exports.qbx_management:RemoveGangMenuItem('hideout_tools')

Returns true.

Open events ​

These client events open the tablet, so scripts made for qb-bossmenu / qb-gangmenu (illenium-appearance and others) keep working:

EventOpens
qb-bossmenu:client:OpenMenuThe player's job tablet
qb-bossmenu:client:openMenuThe player's job tablet
qb-bossmenu:client:forceMenuThe player's job tablet
qb-gangmenu:client:OpenMenuThe player's gang tablet
lua
TriggerEvent('qb-bossmenu:client:OpenMenu')
TriggerEvent('qb-gangmenu:client:OpenMenu')

FWB Studio documentation.