# Installation Guide

{% stepper %}
{% step %}

### 1. Codesign Bridge

{% hint style="danger" icon="1" %}

#### **This script requires `cd_bridge` to be installed and running before it can function**

**`cd_bridge`** is plug-and-play and requires no setup. It automatically handles:

* Framework integration
* Database setup
* Script compatibility
* Error Handling

Once started, it will detect and connect to all supported scripts automatically.

[**👉 See the \[Full Bridge Setup Guide\] →**](https://docs.codesign.pro/paid-scripts/bridge/installation-guide)
{% endhint %}
{% endstep %}

{% step %}

### 2. Download Script

{% hint style="danger" icon="2" %}

#### Download the Script from the FiveM Portal Website

1. [**👉 Download cd\_dispatch3d →**](https://portal.cfx.re/assets/granted-assets?search=cd_dispatch3d)
2. Unzip the downloaded file
3. In your server’s `resources` directory, create a folder named `[codesign]` if it does not already exist
4. Place **`cd_dispatch3d`** (and all other Codesign scripts) inside the **`[codesign]`** folder
   {% endhint %}

<div align="left" data-with-frame="true"><figure><img src="/files/ggCsOK6BR8qHOrkhPwNl" alt=""><figcaption><p>Example resources folder with a <code>[codesign]</code> directory</p></figcaption></figure></div>
{% endstep %}

{% step %}

### 3. Database Setup (SQL)

{% hint style="danger" icon="3" %}

#### No manual SQL setup required.

The script automatically inserts all required database tables.

```lua
Config.AutoInsertSQL = true
```

Make sure this is enabled in `cd_dispatch3d/configs/config.lua`.
{% endhint %}
{% endstep %}

{% step %}

### 4. Configure Script

{% hint style="danger" icon="4" %}

#### Review the `config.lua` Settings

Open <kbd>**cd\_dispatch3d/configs/config.lua**</kbd> and check the available settings.

* Update the options that are needed for your server.
* Read the comments next to each option, as they explain what each setting does.
  {% endhint %}
  {% endstep %}

{% step %}

### 5. Configure Key Binds

{% hint style="danger" icon="5" %}

#### Configure Before Starting the Resource

**Before Starting the Resource**

* Before launching this resource on your main or live server, we strongly recommend configuring your key binds first.
* This resource uses [FiveM’s Key Mapping](https://docs.codesign.pro/helpful-guides/register-key-mapping) system.

**Where Can I Configure My Key Binds?**

* You can configure all key binds directly in **`cd_dispatch3d/configs/config.lua`**.

**Why Is This Important?**

* Once a player joins your server with this resource running, you can no longer force key bind changes through the config file.
* Players must adjust their key binds manually through the in-game pause menu settings.
* Any changes you make will still apply to new players who join afterward.
* This system is more optimized and gives players the flexibility to customize their key binds for both keyboard and controller use.
* You can also review the [Default key Binds](/paid-scripts/dispatch3d/developer-api/keys.md) binds provided with this resource.
  {% endhint %}

<div align="left" data-with-frame="true"><figure><img src="/files/q5RfrGdfsMxAgSx0bYwT" alt=""><figcaption><p>Keybind settings located in the pause menu</p></figcaption></figure></div>
{% endstep %}

{% step %}

### 6. Replace Old Dispatch Alerts

{% hint style="info" icon="6" %}

#### ℹ️ Notice

Not all dispatch alerts need to be replaced.

`cd_dispatch3d` now supports the following **without any changes**:

* `cd_dispatch` (classic)
* `ps-dispatch`
* `lb-tablet`
* `redutzu-mdt`
* Default ESX police alerts
* Default QBCore police alerts

Only replace alerts if you are using a **custom or unsupported** police alert system.
{% endhint %}

{% hint style="danger" icon="6" %}

### Find the old alert

* <mark style="color:$danger;">Red</mark> → Old dispatch alert
* <mark style="color:green;">Green</mark> → Old alert replaced with `cd_dispatch3d`

> Not every resource will look the same, but the implementation concept remains identical.

<img src="/files/66eo1YNoazgNFfcVpkD1" alt="" data-size="original">
{% endhint %}

{% hint style="danger" icon="6" %}

### Having trouble finding the old alert?

#### Trigger the Alert Where the Action Starts!

Dispatch alerts should be triggered **where the event begins**, for example:

* When the robbery starts
* When a crime is committed

❌ **Bad Practice**\
Triggering alerts inside an event that already broadcasts to all police:

* Causes duplicate notifications
* Creates duplicate blips
* Results in dispatch spam

✅ **Good Practice**\
Trigger the alert:

* At the source of the action
* Before any police broadcast or blip creation
* Let `cd_dispatch3d` handle visibility and syncing

![](/files/XGuRGRjrAlO9po7koRFF)
{% endhint %}

{% hint style="danger" icon="6" %}

### Continue with Step 7.

Once you’ve found the old dispatch alert to replace, continue with Step 7.
{% endhint %}
{% endstep %}

{% step %}

### 7.  Add New Dispatch Alerts

{% hint style="danger" icon="7" %}

#### Compatible Integrations by Codesign

On our [**Resource Integration**](https://docs.codesign.pro/paid-scripts/dispatch3d/resource-integration) page, you can find a full list of **pre-integrated and compatible scripts** that work seamlessly with **cd\_dispatch3d** and **MDT integrations**.

🔗 [**View the full list of compatible scripts →**](https://docs.codesign.pro/paid-scripts/dispatch3d/resource-integration)
{% endhint %}

{% hint style="danger" icon="7" %}
{% tabs %}
{% tab title="client-side (recommended)" %}

```lua
local data = exports['cd_dispatch3d']:GetPlayerInfo()
TriggerServerEvent('cd_dispatch:AddNotification', {
    job_table = { 'police', 'sheriff' },
    coords    = data.coords,
    title     = '10-15 - Store Robbery',
    message   = 'A ' ..data.sex.. ' robbing a store at ' ..data.street,
    flash     = false,
    sound     = 1,
    blip = {
        sprite  = 431,
        scale   = 1.2,
        colour  = 3,
        flashes = false,
        text    = '911 - Store Robbery',
        time    = 5,
        radius  = 0,
    }
})
```

{% endtab %}

{% tab title="server-side" %}

```lua
TriggerEvent('cd_dispatch:AddNotification', {
    job_table = { 'police', 'sheriff' },
    coords = vector3(0, 0, 0),
    title = '10-15 - Store Robbery',
    message = 'A person robbing a store',
    flash = 0,
    sound = 1,
    blip = {
        sprite = 431,
        scale = 1.2,
        colour = 3,
        flashes = false,
        text = '911 - Store Robbery',
        time = 5,
        radius = 0,
    }
})
```

{% endtab %}
{% endtabs %}

#### Player Info Export Reference

The following export is used in the example above:

{% code title="This data structure can be customized in: integrations/client/client\_exports.lua" %}

```lua
local data = exports['cd_dispatch3d']:GetPlayerInfo()
data.ped       -- Player ped ID (e.g., 123456789)
data.coords    -- Player coordinates (vector3)
data.street_1  -- Street name (e.g., "Palomino Ave")
data.street_2  -- Area name (e.g., "Legion Square")
data.street    -- Full location (e.g., "Palomino Ave, Legion Square")
data.sex       -- Ped sex (e.g., "Male")
```

{% endcode %}
{% endhint %}

#### Dispatch Alert Variable Reference

<table data-full-width="true"><thead><tr><th width="146.3333740234375">Variable Name</th><th width="106.9998779296875" data-type="checkbox">Required</th><th>Example</th><th width="541.333251953125">Description</th></tr></thead><tbody><tr><td><strong><code>job_table</code></strong></td><td>true</td><td><code>{'police', 'sheriff}</code></td><td>List of jobs that will receive the dispatch alert.</td></tr><tr><td><strong><code>coords</code></strong></td><td>true</td><td><code>vec3(0.0, 0.0, 0.0)</code></td><td>World coordinates where the alert occurred.</td></tr><tr><td><strong><code>title</code></strong></td><td>true</td><td><code>'10-19 Robbery'</code></td><td>Title displayed in the dispatch UI, usually 10 codes.</td></tr><tr><td><strong><code>message</code></strong></td><td>true</td><td><code>'Robbery in progress'</code></td><td>Main description shown to responders.</td></tr><tr><td><strong><code>flash</code></strong></td><td>false</td><td><code>true</code></td><td>Whether the alert flashes on the UI. (<code>true/false</code>)</td></tr><tr><td><strong><code>sound</code></strong></td><td>false</td><td><code>1</code></td><td>Dispatch alert sound.<br>Editable in <code>BlipSound()</code> (<code>client/other/functions.lua</code>).<br><code>1</code> = single alert, <code>2</code> = double alert, <code>3</code> = panic alert.</td></tr><tr><td><strong><code>blip</code></strong></td><td>false</td><td></td><td>Map blip configuration (see below).</td></tr><tr><td><strong><code>blip.sprite</code></strong></td><td>false</td><td><code>431</code></td><td>GTA blip sprite ID - <a href="https://docs.fivem.net/docs/game-references/blips/">More here.</a></td></tr><tr><td><strong><code>blip.scale</code></strong></td><td>false</td><td><code>1.2</code></td><td>Blip size on the map: <code>0.1</code>-<code>2.0</code>.</td></tr><tr><td><strong><code>blip.colour</code></strong></td><td>false</td><td><code>3</code></td><td>Blip color ID - <a href="https://docs.fivem.net/docs/game-references/blips/">More here at bottom.</a></td></tr><tr><td><strong><code>blip.flashes</code></strong></td><td>false</td><td><code>true</code></td><td>Whether the blip flashes. (<code>true/false</code>)</td></tr><tr><td><strong><code>blip.time</code></strong></td><td>false</td><td><code>5</code></td><td>Time until blip fades and deletes (minutes)</td></tr><tr><td><strong><code>blip.radius</code></strong></td><td>false</td><td><code>0</code></td><td>Randomize coords; use a radius blip.<br><code>0</code> disables it, <strong>50–100</strong> recommended.</td></tr></tbody></table>
{% endstep %}
{% endstepper %}


---

# Agent Instructions: 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.codesign.pro/paid-scripts/dispatch3d/installation-guide.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.
