> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-dispatch/configuration/dispatch-settings.md).

# Dispatch Settings

Every field in Config.Dispatch, with its default and what changing it does.

All of this lives in one table in `config/config.lua`.

### Call lifetime

```lua
Config.Dispatch = {
    autoResolveMinutes = 60,
    historyMinutes = 1440,
    distanceUnit = 'mi',
    autoPromotePrimary = true,
```

| Key                  | Default      | What it does                                                                                                                            |
| -------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| `autoResolveMinutes` | `60`         | An open call this old is closed automatically. The sweep runs once a minute                                                             |
| `historyMinutes`     | `1440` (24h) | How long a resolved call stays readable in recent history before it is purged from memory. Also the default window for `GetRecentCalls` |
| `distanceUnit`       | `'mi'`       | `'mi'` or `'km'`. Controls the distance shown on alert cards and in the call window                                                     |
| `autoPromotePrimary` | `true`       | When Primary cancels their response, the next responder in line becomes Primary. Set `false` to leave the call with no Primary          |

{% hint style="warning" %}
`historyMinutes` should always be larger than `autoResolveMinutes`. The purge deletes by **creation** time, so a history window shorter than the auto-resolve window would drop calls that are still open.
{% endhint %}

### The 911 command

```lua
    call911 = {
        enabled = true,
        command = '911',
        cooldownSeconds = 15,
    },
```

| Key               | Default | What it does                                                                              |
| ----------------- | ------- | ----------------------------------------------------------------------------------------- |
| `enabled`         | `true`  | Set `false` and the command is never registered - useful if your phone resource owns 911  |
| `command`         | `'911'` | The command name without the slash. `'call911'` gives you `/call911`                      |
| `cooldownSeconds` | `15`    | Per-player cooldown. A player inside it gets a warning notification and no call is raised |

Full behaviour on [911 Calls](/mango5m-docs/resources/mango-dispatch/features/911-calls.md).

### Calls raised from client scripts

```lua
    clientCall = {
        cooldownSeconds = 5,
    },
```

Rate limit for `exports['mango_dispatch']:CreateCall` **from the client**. It is per player, and a call inside the window is dropped silently. Server-side `CreateCall` is not rate limited at all - the server is trusted.

### The quick call window

```lua
    window = {
        key = 'F7',
        maxCalls = 4,
        refreshSeconds = 5,
    },
```

| Key              | Default | What it does                                                                                      |
| ---------------- | ------- | ------------------------------------------------------------------------------------------------- |
| `key`            | `'F7'`  | Default bind to toggle the window. Remappable by each player in FiveM's keybind menu              |
| `maxCalls`       | `4`     | How many open calls the window lists, newest first                                                |
| `refreshSeconds` | `5`     | How often the open window re-queries the server. **The timer only runs while the window is open** |

More on [The Quick Call Window](/mango5m-docs/resources/mango-dispatch/features/the-quick-call-window.md).

### The responding blip

```lua
    respondingBlip = {
        enabled = true,
        sprite = 161,
        color = 3,
        scale = 0.9,
        route = true,
    },
}
```

| Key       | Default | What it does                                  |
| --------- | ------- | --------------------------------------------- |
| `enabled` | `true`  | Draw a blip at the call you are responding to |
| `sprite`  | `161`   | Any GTA blip sprite id                        |
| `color`   | `3`     | Blip colour, also used for the route line     |
| `scale`   | `0.9`   | Blip size                                     |
| `route`   | `true`  | Also draw a GPS route to it                   |

The blip is created when you respond and removed when you cancel, clear the call, or the call is resolved by someone else. It is also removed if the resource stops, so a restart never leaves a stuck blip on anyone's map.

### The rest

`alertDisplaySeconds` and `alertSound` are covered in [Alerts and Sound](/mango5m-docs/resources/mango-dispatch/configuration/alerts-and-sound.md); `keys` in [Keybinds](/mango5m-docs/resources/mango-dispatch/configuration/keybinds.md).
