> For the complete documentation index, see [llms.txt](https://docs.tmc.bj/v2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tmc.bj/v2/other-resources/dispatch.md).

# Dispatch

A modern take on dispatch calls. Allows servers to send notifications to jobs and include zone-based restrictions if they want.

### AddCall

A server function to add a call for a job

<table><thead><tr><th width="200">Parameter</th><th width="98" data-type="checkbox">Required</th><th width="93">Type</th><th>Description</th></tr></thead><tbody><tr><td>callObj</td><td>true</td><td>Object</td><td>A call definition containing all information about a dispatch call.</td></tr></tbody></table>

```lua
-- Server
TMC.Functions.TriggerEvent('dispatch:server:addCall', {
    title = "A title!",
    description = "Some longer description",
    jobType = 'jobType',
    position = vector3(0, 0, 0),
    urgency = 1,
    limits = {}
})

-- Client
TMC.Functions.TriggerServerEvent('dispatch:server:addCall', {
    title = "A title!",
    description = "Some longer description",
    jobType = 'jobType',
    position = vector3(0, 0, 0),
    urgency = 1,
    limits = {}
})
```

### Call Object Definition

```lua
{
    title = "A title!", -- (Required)
    description = "Some longer description", -- (Required)
    jobType = 'jobType', -- (Required) Can be a single string or list of strings. I.e. { 'police', 'medical' }
    position = vector3(0, 0, 0), -- (Optional)
    urgency = 1, -- (Optional) Urgency value related to config
    limits = {} -- (Optional) List of limitations for example: { 'hunting' }
}
```
