1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-07-09 19:41:05 +02:00
parent 30bf7c8604
commit 8dbe79a29d
135 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,21 @@
--- @return boolean @true if player is boss, false if not
tgiCore.isBoss = function(job)
if job and job ~= PlayerData.job.name then return end
return PlayerData.job.boss or PlayerData.job.isboss or (PlayerData.job.grade_name and PlayerData.job.grade_name == "boss")
end
--- Open boss menu for player job
tgiCore.OpenBossMenu = function()
if not tgiCore.isBoss() then return end
if config.tgiannServer then
TriggerEvent('esx_society:openBossMenu', PlayerData.job.name, function(_, menu)
menu.close()
end, { wash = false })
else
if config.framework == "esx" then
TriggerEvent('esx_society:openBossMenu', PlayerData.job.name, function() end, { wash = false })
elseif config.framework == "qb" then
TriggerEvent("qb-bossmenu:client:OpenMenu")
end
end
end