# outsider\_jobalerts

{% hint style="danger" %}

* SERVER SIDE ONLY
  {% endhint %}

<details>

<summary>API</summary>

```lua
--- all Jobs registered to receive alerts
---@return table -- table of jobs
local data = exports.outsider_jobalerts:GetCurrentAlertedJobs()

--- if you only need the jobs for a specific index
---@param index string -- index of joblist Example "Law"
---@return table | boolean -- table of jobs by index
local data = exports.outsider_jobalerts:GetCurrentAlertedJobsByIndex(index)

--- all alerts that are currently active
---@return table |boolean -- table of alerts
local data = exports.outsider_jobalerts:GetAllCurrentAlerts()

--- if you only need the alerts for a specific index
---@param index string -- index of joblist Example "Law"
---@return table | boolean -- table of alerts by index
local data = exports.outsider_jobalerts:GetCurrentAlertByIndex(index)

--- set alert as finished
---@param index string -- index of joblist Example "Law"
---@param source number -- player id
---@return boolean  -- true if success
local data = exports.outsider_jobalerts:FinishAlert(index, source)

--- remove alert
---@param source number -- player id
---@param index string -- index of joblist Example "Law"
---@return boolean  -- true if success
local data = exports.outsider_jobalerts:RemoveAlert(source, index)

--- insert alert
---@param source number -- player id
---@param command string -- command of joblist Example "alertlaw"
---@return boolean  -- true if success
local data = exports.outsider_jobalerts:InsertAlert(source, command)
```

</details>
