> 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-mdt/features/dispatch-and-911.md).

# Dispatch and 911

Live calls, the /911 command, HUD alerts, the quick call window, crime hotspots, and the officer map.

The dispatch plugin runs your server's call flow end to end: citizens call `/911`, on-duty officers get an alert, respond with a keypress, and everything lands on the MDT's Dispatch map and Active Calls board. All tuning lives in `config/dispatch.lua`.

## The call flow

1. **A call comes in** — a citizen's `/911 <message>` (15s per-player cooldown), or another resource via the [`CreateDispatchCall` exports](/mango5m-docs/resources/mango-mdt/reference/exports-and-events.md): server-side with fixed coordinates (an alarm, an ANPR hit), or **client-side with the player's real location auto-resolved** (a carjacking, shots fired — street and zone names included, no coordinates needed).
2. **Officers are alerted** — a HUD alert card with the details, an alert sound, and a GPS blip. (Or through your own dispatch resource instead — see [Dispatch Integration](/mango5m-docs/resources/mango-mdt/configuration/dispatch-integration.md).)
3. **Officers respond** — `Y` accepts / `N` declines while the card is up (default 30 s). The first responder is **Primary**; others can roll up as secondary and take Primary with `TAB`.
4. **The call is cleared** — Code 4 (`Backspace`), or auto-resolved after `autoResolveMinutes` (default 60) so forgotten calls can't pile up. Cleared calls stay in Recent Calls history for 24 h.

## The quick window

`F7` (rebindable) toggles a small top-left panel of current active calls **without opening the tablet** — and while responding, the same panel shows who else is rolling on your call. `Config.Dispatch.window` controls the key, list size, and refresh rate.

## Crime hotspots

Calls from the last hour are clustered by proximity; the two busiest clusters show on the Dispatch map as hotspots (the busiest reads "high crime"). Tuning: `crimeHotspotWindowMinutes`, `crimeHotspotRadius`, `crimeHotspotMinCalls`, `crimeHotspotHighThreshold`.

## The officer map

On-duty officers (authenticated into the MDT this session) report their position every 5 s and appear on the Dispatch map, colour-coded by department. `showAllDepartments = true` shows every department's units to everyone; `false` restores own-department-only privacy.

## Alert card and sound

```lua
alertDisplaySeconds = 30,
alertSound = {
    enabled = true,
    file = 'dispatch-alert.mp3',   -- the DEFAULT sound, a file inside web/sounds/
    volume = 0.6,
},
```

Drop your own `.mp3` into `mango_mdt/web/sounds/` — if the file doesn't exist, nothing plays and nothing errors.

**Per-call sounds:** any call raised through the [`CreateDispatchCall` exports](/mango5m-docs/resources/mango-mdt/reference/exports-and-events.md) can name its own sound file (`sound = 'fleeca-alarm.mp3'`) — that alert plays it instead of the default, so a bank alarm sounds different from a carjacking. `enabled` and `volume` apply to every alert regardless of which file plays; `/911` always uses the default.

## Keybinds

All rebindable per-player in FiveM's **Settings → Key Bindings → FiveM**:

| Default     | Action                         |
| ----------- | ------------------------------ |
| `F7`        | Toggle the quick call window   |
| `Y`         | Accept call / respond          |
| `N`         | Decline call / cancel response |
| `Backspace` | Code 4 (clear) your call       |
| `TAB`       | Take Primary on your call      |
| `↑` / `↓`   | Highlight previous / next call |
