Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion shared/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down