Client Exports
Called from another resource’s client-side script.
openBossMenu
Opens the boss management panel for a given job, running the same permission check the resource uses internally.
| Parameter | Type | Required | Description |
|---|---|---|---|
jobName | string | No | Job to open boss menu for. Falls back to the player’s active job. |
jobLabel | string | No | Display label. Inferred from registry when omitted. |
Returns: boolean — true if the menu opened successfully.
local ok = exports['zephyr_multijob']:openBossMenu('police', 'Police')addBossMenuItem
Registers a custom action item inside the boss menu. Use '*' as jobName to inject into every job’s boss menu, or a specific job name to scope it.
Items persist for as long as the registering resource is running.
| Parameter | Type | Required | Description |
|---|---|---|---|
jobName | string | Yes | Job to scope item to, or '*' for all jobs. |
item.title | string | Yes | Label shown in the menu. |
item.id | string | No | Unique ID used for removal. Auto-generated if omitted. |
item.description | string | No | Sub-text below the title. |
item.icon | string | No | Font Awesome icon name (no fa- prefix). |
item.onSelect | function | No | Called when the player selects this item. |
AddEventHandler('onClientResourceStart', function(resourceName)
if resourceName ~= GetCurrentResourceName() then return end
exports['zephyr_multijob']:addBossMenuItem('*', {
id = 'my-action',
title = 'Society Account',
description = 'Open society finance tools',
icon = 'building-columns',
onSelect = function()
TriggerEvent('my-resource:client:openSociety')
end,
})
end)removeBossMenuItem
Removes a previously registered boss menu item by its id.
| Parameter | Type | Required | Description |
|---|---|---|---|
jobName | string | Yes | Same jobName used when registering. |
id | string | Yes | The id of the item to remove. |
Returns: boolean — true if the item was found and removed.
AddEventHandler('onClientResourceStop', function(resourceName)
if resourceName ~= GetCurrentResourceName() then return end
exports['zephyr_multijob']:removeBossMenuItem('*', 'my-action')
end)