Files
community_bridge/modules/bossmenu/_default/client.lua
T
MrNewb 755fe9ba10 experimental but good
Early on I gave the name management to banking, I know I know it was dumb. BUT we can either deprecate them and move this to it or keep boss menu as its own module and deprecate the banking in time to a name that makes sense. Open to suggestions here
2025-06-30 21:31:06 -04:00

24 lines
984 B
Lua

---@diagnostic disable: duplicate-set-field
BossMenu = BossMenu or {}
---This will get the name of the module being used.
---@return string
BossMenu.GetResourceName = function()
return "default"
end
RegisterNetEvent('community_bridge:client:OpenBossMenu', function(jobName, jobType)
-- these systems seem to do the verification for isboss themselves, so we don't need to check if the player is a boss.
-- also this source check is to ensure that the event is only triggered by the server.
if source ~= 65535 then return end
if BossMenu.GetResourceName() == "esx_society" then
local ESX = exports["es_extended"]:getSharedObject() -- better solution needed but fuck it for now.
TriggerEvent('esx_society:openBossMenu', jobName, function(menu)
ESX.CloseContext()
end, {wash = false})
elseif BossMenu.GetResourceName() == "qbx_management" then
exports.qbx_management:OpenBossMenu(jobType)
end
end)
return BossMenu