forked from Simnation/Main
ed
This commit is contained in:
parent
30bf7c8604
commit
8dbe79a29d
135 changed files with 0 additions and 0 deletions
21
resources/[standalone]/tgiann-core/client/functions/boss.lua
Normal file
21
resources/[standalone]/tgiann-core/client/functions/boss.lua
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue