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

# Dispatch System

## Dispatch Systems

Smart Fires v2 integrates with dispatch scripts, MDT addons, CAD products, and specialist pagers. When an incident notifies dispatch, `ServerFireManager:triggerExternalDispatch` in `sv_utils.lua` reads `Config.DispatchSystems` and runs each bridge you have switched on, passing coords, a title, and a message.

### Skipping external dispatch for a single export call

If you spawn an incident through [`CreateFire`](/london-studios-documentation/resources/smart-fires-v2/exports-and-events.md#createfire) or [`CreateSmoke`](/london-studios-documentation/resources/smart-fires-v2/exports-and-events.md#createsmoke) and your script handles paging or MDT routing itself, pass `suppressExternalDispatch = true` as the last argument. Smart Fires will still notify subscribed firefighters through its own dispatch toasts (fires when `manualFireDispatch` is enabled; smoke through the normal smoke dispatch path), but it will **not** call `triggerExternalDispatch` (so Night Shifts MDT, ps-dispatch, Sonoran CAD, and every other entry under `Config.DispatchSystems` stays silent for that spawn).

```lua
exports.SmartFires:CreateFire(x, y, z, 'standard', 10.0, 5, nil, true)
exports.SmartFires:CreateSmoke(x, y, z, 'normal', 12.0, true)
```

The tablet, `/startfire`, auto-spawned incidents, and the Fire Control smoke menu are unchanged; only export-driven spawns honour this flag.

{% hint style="warning" %}
Enable only systems you actively run on the server. Turning on multiple products that notify the same jobs will duplicate every fire call on the map.
{% endhint %}

Everything below matches the shipped `DispatchSystems` table in `config.lua`. If your paste of the resource is older or customised, defer to your local `config.lua` for exact field names.

### Dispatch alerts

These integrations post a standard “new fire call” pattern into standalone dispatch menus.

#### cd\_dispatch

Sends `cd_dispatch:AddNotification` as a client event (`-1`) with your job table, title, coords, message, and a built-in blip block on the FiveM side.

```lua
cdDispatch = {
    enabled = false,
    jobs = {'firefighter'},
    title = 'New Fire',
},
```

#### cd\_dispatch 3D

Uses the server-side cd\_dispatch notification variant with configurable flash, sound, and blip data.

```lua
cdDispatch3D = {
    enabled = false,
    jobs = {'firefighter'},
    title = "New Fire",
    flash = 0,
    sound = 1,
    blip = { sprite = 431, scale = 1.2, colour = 3, flashes = false, text = 'New Fire', time = 5, radius = 0 }
},
```

#### core\_dispatch

Calls `exports['core_dispatch']:addCall` once per job in `jobs`.

```lua
coreDispatch = {
    enabled          = false,
    code             = "20-12",
    jobs             = {'police'},
    notificationTime = 3000,
    blipSprite       = 11,
    blipColour       = 5,
    priority         = true,
},
```

#### rcore\_dispatch

Triggers `{resourceName}:server:sendAlert` with colours, sprites, timing, optional image and sound URLs, and your job filter.

```lua
rcoreDispatch = {
    enabled      = false,
    resourceName = "rcore_dispatch",
    jobs         = {'police'},
    priority     = "high",
    displayCode  = "10-420",
    alertType = 'alerts',
    blipName = "New Fire",
    radius = 0,
    blipTime = 5,
    blipSprite = 436,
    blipColour = 1,
    blipScale = 1.5,
    blipLength = 3,
    blipflash = true,
    imageUrl = '',
    soundUrl = ''
},
```

#### qs-dispatch

Runs `{resourceName}:server:CreateDispatchCall`, so `resourceName` must match how you renamed qs-dispatch on disk.

```lua
qsDispatch = {
    enabled      = false,
    resourceName = "qs-dispatch",
    jobs         = {'fire', 'police'},
    callCode     = { code = '', snippet = '' },
    flashes      = false,
    image = 'https://dunb17ur4ymx4.cloudfront.net/webstore/logos/30cf9edc7043455c60397ba2f12e620993426e29.png',
    blipSprite   = 436,
    blipColour   = 1,
    blipScale    = 1.5,
    blipLength   = 3,
    blipflash    = true,
    blipText     = "Fire",
    blipTime     = 60000,
},
```

#### ps-dispatch

Emits `ps-dispatch:server:notify` with full audio, icon, and blip payloads.

```lua
psDispatch = {
    enabled  = false,
    jobs     = {'police'},
    codeName = "fire",
    code     = "10-50",
    priority = 1,
    sprite   = 436,
    color    = 1,
    scale    = 1.5,
    length   = 3,
    flash    = true,
    sound    = "Lose_1st",
    icon     = 'fas fa-fire-extinguisher',
},
```

#### emergencyDispatch

Thin wrapper around `emergencydispatch:emergencycall:new` with configurable job slug.

```lua
emergencyDispatch = { enabled = false, job = "fire" },
```

#### TMC dispatch (`tmcDispatch`)

For servers running [TMC v2](https://docs.tmc.bj/v2), posts calls through the built-in `dispatch:server:addCall` event via `TMC.Functions.TriggerEvent`. Requires the `core` resource to be started.

```lua
tmcDispatch = {
    enabled = true,
    title = 'Fire Reported',
    description = 'Member of the public has reported a fire. %s',
    jobType = { 'sass' },
    urgency = 5,
    limits = {},
},
```

| Field         | Purpose                                                         |
| ------------- | --------------------------------------------------------------- |
| `title`       | Dispatch title shown to receiving units.                        |
| `description` | Call body. Use `%s` to inject the Smart Fires incident message. |
| `jobType`     | Job filter array (match your TMC department job types).         |
| `urgency`     | Numeric urgency passed to dispatch.                             |
| `limits`      | Optional limits table; use `{}` if unused.                      |

Full TMC setup (permissions, notifications, items): [TMC Integration](/london-studios-documentation/resources/smart-fires-v2/tmc-integration.md).

### lb-tablet and TK integrations

Dedicated tablet stacks for incident boards and TK dispatch tooling.

#### lb-tablet

Calls `lb-tablet` export `AddDispatch` with configurable priority, code, timers, imagery, audio, and target job slug.

```lua
lbTablet = {
    enabled  = false,
    priority = 'medium',
    code     = '',
    title    = 'New Fire',
    time     = 5,
    image    = '',
    job      = 'fire',
    sound    = false,
},
```

#### tk\_dispatch

Feeds `exports.tk_dispatch:addCall` colours, durations, flashing, paging jobs, plus blip table.

```lua
tkDispatch = {
    enabled     = false,
    title       = "New Fire",
    code        = "10-70",
    priority    = "1",
    removeTime  = 600000,
    showTime    = 10000,
    color       = 'red',
    playSound   = true,
    flash       = true,
    jobs        = {'firedepartment', 'ambulance'},
    blip        = { sprite = 436, scale = 1.0, color = 1 }
},
```

#### tk\_mdt

Uses `exports.tk_mdt:addCall` when you rely on TK’s EMS MDT routing.

```lua
tkMdt = {
    enabled  = false,
    title    = "New Fire",
    type     = 'ambulance',
    time     = 600000,
    callsign = "10-70",
},
```

### MDT add-ons

These push directly into scripted MDT resources other than TK.

#### Night Shifts MDT (`nightsSoftwareMdt`)

Forwards structured fire calls through `ForwardCallToMDT`; requires `night_shifts_mdt`.

```lua
nightsSoftwareMdt = { enabled = false },
```

#### Redutzu MDT

Raises `redutzu-mdt:server:addDispatchToMDT`.

```lua
redutzuMdt = {
    enabled = false,
    code = '10-70',
    duration = 60000,
},
```

#### Piotreq GPT alert feed

Passes rich metadata into `exports['piotreq_gpt']:SendAlert`.

```lua
piotreq = {
    enabled = false,
    code = '10-70',
    icon = 'fire',
    type = 'risk',
    time = 5,
    jobs = { fire = 0 },
},
```

#### f\_mdt

Uses `exports['f_mdt']:addDisatch` (string matches upstream export spelling).

```lua
fMdt = {
    enabled = false,
    code = '10-70',
},
```

#### Sky Ambulance Job

```lua
skyAmbulanceJob = {
    enabled = false,
    jobs = {"firefighter", "ambulance"},
},
```

#### Deltarix dispatch

Writes `deltarix_dispatch:server:createCall` with your job table forwarded from config.

```lua
deltarixMdt = {
    enabled = false,
    jobs = {},
},
```

#### Wasabi MDT

Passes job filters into `wasabi_mdt:server:addCall`.

```lua
wasabiMdt = {
    enabled = false,
    jobs = {}
},
```

#### Albo FMS

Creates a CAD entry through the **`fms`** resource export `createCad`. Smart Fires sends `type = "Fire"`, the dispatch message as `description`, and the incident horizontal position as `x` and `y` (from the fire coordinates). Ensure the Albo FMS **`fms`** resource is started and configured before Smart Fires; the integration callback logs success or errors to the server console.

```lua
alboFms = {
    enabled = false,
},
```

#### Codem Dispatch bridge (`codeMDispatch`)

Emits client event `Client:fireNotificationCodeM` with coords and message only. Extend `sv_utils.lua` if your Codem build needs the extra typed fields surfaced on the packet.

```lua
codeMDispatch = {
    enabled       = false,
    dispatchType  = "Fire",
    dispatchCode  = "10-4",
    dispatchJobs  = {"fire", "firefighter"},
},
```

#### Origen Police alert stack

Delegates to OrigenPolice `SendAlert` export with editable dispatch taxonomy.

```lua
origenPolice = { enabled = false, dispatchType = "GENERAL", job = "fire", title = "Fire Alert" },
```

### CAD systems

Connectivity for external CAD simulators plus our HTTP-backed CDE option.

#### Sonoran CAD

Calls `exports.sonorancad:call911`; optional postal lookup when `nearest-postal` is present.

```lua
sonoranCAD = { enabled = false, useNearestPostal = true },
```

#### Imperial CAD

Feeds `exports["ImperialCAD"]:CreateCall` with GTA coords, textual nature, postal string, priority, status.

```lua
imperialCAD = { enabled = false, useNearestPostal = true, status = "", priority = "" },
```

#### SnailyCAD

Produces `sna-call911:server:createCall`; lets you customise caller label and postal usage.

```lua
snailyCad = {
    enabled          = false,
    caller           = 'Dispatch',
    useNearestPostal = false,
},
```

#### CDE CAD (HTTP REST)

Issues an authenticated POST (`X-API-Key`) toward `{URL}/api/fivem/911`. Populate `CallerName`, `APIKey`, and `URL` from your CAD admin panel; empty strings skip the outbound request.

```lua
CDECAD = {
    enabled         = false,
    URL             = "https://cdecad.com/api",
    APIKey          = "",
    CallerName      = "SmartFires v2",
    DefaultPriority = "high",
},
```

### Inferno Collection

Inferno tooling is modular; enable only the pieces you licence.

#### Pager Legacy

Fans out `Fire-EMS-Pager:PlayTones` to every pager group named in config.

```lua
infernoPager = { enabled = false, pagersToTrigger = {"fire"} },
```

#### Pager Reborn

Raises `Inferno-Collection:Server:PagerReborn:Editable:CreatePage` with description built from incident title plus message body.

```lua
infernoPagerReborn = { enabled = false, addressesToPage = {"emg.fire"} },
```

#### Station alert beacon

Passes nearest-station colouring and tonal metadata into inferno station alert exports. The scripted message suffix is bundled server-side (“station reported fire”).

```lua
infernoStationAlert = { enabled = false, unitIndicatorColors = {"red"}, tone = "" },
```

### nearest-postal dependency

Snaily CAD, Imperial CAD, and Sonoran CAD can append nearest-post coordinates when each block sets `useNearestPostal = true`. Run the `nearest-postal` asset before Smart Fires and expose `exports['nearest-postal']:getPostalServer` or toggle those booleans false.

### Rolling your own connector

Fork `triggerExternalDispatch` inside `sv_utils.lua`, copy any existing method, rename the config subtree, wire your TriggerEvent/export, then append matching keys beneath `DispatchSystems`.

### Want to suggest a new integration?

Suggest a new integration using the form below:

### [Integration Requests](/london-studios-documentation/general/integration-requests.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.londonstudios.net/london-studios-documentation/resources/smart-fires-v2/dispatch-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
