Skip to main content

OpenBossMenu

This event opens the boss menu of the player's current job.

TriggerEvent('CompanyManager:company:openBossMenu')

Example Usage​

local BossCoordExample = vec3(460.0306, -986.2433, 29.72808)

CreateThread(function()
while true do
Wait(0)
local letSleep = true
local pedCoords = GetEntityCoords(PlayerPedId())
local dist = #(pedCoords - BossCoordExample)

if ESX.PlayerData.job and ESX.PlayerData.job.name == 'police' then
if dist < 10.0 then
letSleep = false
DrawMarker(1, BossCoordExample, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, 1.5, 1.0, 255, 128, 0, 255, false, false, 2, nil, nil, false)
if dist < 1.5 then
ESX.ShowHelpNotification('Press ~INPUT_CONTEXT~ to open boss menu')
-- opens any boss job menu that you are currently on
if IsControlJustReleased(0, 38) then
TriggerEvent('CompanyManager:company:openBossMenu')
end
end
end
end
if letSleep then
Wait(500)
end
end
end)