zephyr_multijobExportsClient

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.

ParameterTypeRequiredDescription
jobNamestringNoJob to open boss menu for. Falls back to the player’s active job.
jobLabelstringNoDisplay label. Inferred from registry when omitted.

Returns: booleantrue 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.

ParameterTypeRequiredDescription
jobNamestringYesJob to scope item to, or '*' for all jobs.
item.titlestringYesLabel shown in the menu.
item.idstringNoUnique ID used for removal. Auto-generated if omitted.
item.descriptionstringNoSub-text below the title.
item.iconstringNoFont Awesome icon name (no fa- prefix).
item.onSelectfunctionNoCalled 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.

ParameterTypeRequiredDescription
jobNamestringYesSame jobName used when registering.
idstringYesThe id of the item to remove.

Returns: booleantrue if the item was found and removed.

AddEventHandler('onClientResourceStop', function(resourceName)
    if resourceName ~= GetCurrentResourceName() then return end
    exports['zephyr_multijob']:removeBossMenuItem('*', 'my-action')
end)