diff --git a/client/main.lua b/client/main.lua index 33ab59e9..1833570b 100644 --- a/client/main.lua +++ b/client/main.lua @@ -126,11 +126,12 @@ end ---@return boolean -- Returns true if the job is valid local function isJobValid(data) local jobType = PlayerData.job.type + local jobName = PlayerData.job.name if type(data) == "string" then - return lib.table.contains(Config.Jobs, data) + return lib.table.contains(Config.Jobs, data) or lib.table.contains(Config.Jobs, jobName) elseif type(data) == "table" then - return lib.table.contains(data, jobType) + return lib.table.contains(data, jobType) or lib.table.contains(data, jobName) end return false diff --git a/shared/config.lua b/shared/config.lua index 9f6b8e94..4d414495 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -9,7 +9,7 @@ Config.AlertTime = 5 -- Specify the duration for the alert to appear on the Config.MaxCallList = 25 -- maximum dispatch calls in dispatch list Config.OnDutyOnly = true -- Set true if only on duty players can see the alert -Config.Jobs = { -- Job Types that can access the dispatch menu +Config.Jobs = { -- Job Types or names that can access the dispatch menu. If you want to allow more jobs to see certain dispatch alerts. Go to alerts.lua and add the job name to the alert. "leo", "ems" }