# Dispatch

[**Buy Here**](https://codesign.pro/product/4206357)

[**FiveM Forums Post**](https://forum.cfx.re/t/release-paid-dispatch-script-by-codesign/2007097)

[**YouTube Showcase Video**](https://youtu.be/AiEDaansdqk)

This resource can be purchased as part of a bundle for a discount [here](https://codesign.pro/package/5162629)

#### Translate

* [Click here to translate this page.](https://docs-codesign-pro.translate.goog/paid-scripts/dispatch?_x_tr_sl=en&_x_tr_tl=es&_x_tr_hl=en-GB&_x_tr_pto=nui)
* [How do I change language?](https://gyazo.com/38606313ac9a7c290dc2c72b6793bde6)

## INSTALLATION GUIDE

### Step 0 - First Steps

{% hint style="warning" %}
**1.** Download your resource from [FiveM’s Portal](https://portal.cfx.re/assets/granted-assets). &#x20;

**2.** Unzip the `cd_dispatch.zip` folder and place this folder in your server's resource folder.

**3.** Add the resource to your server start config (server.cfg): `ensure cd_dispatch`. If you are using a framework, it must be placed anywhere below your framework resource e.g., es\_extended, not above.

```
ensure es_extended
ensure cd_dispatch
```

{% endhint %}

### Step 1 - Fxmanifest

{% hint style="warning" %}
Depending on your framework and dependencies, you may need to make some changes to the **`[cd_dispatch/fxmanifest.lua]`**. We have made this easier by [commenting ](https://i.imgur.com/bbb0dam.png)on the lines you possibly need to change.
{% endhint %}

### Step 2 - Configure Resource

{% hint style="warning" %}
You **MUST** read all configurable options inside the **`[cd_dispatch/configs/config.lua]`** file and configure them to suit your server's needs. Please read the [”commented out help text”](https://i.imgur.com/QCja8UZ.png) at the end of each line so you can understand what each config option does.

**The most important sections are the options under the** [**Framework** ](https://i.imgur.com/4ukCTZr.png)**and** [**Important** ](https://i.imgur.com/IVm7E8l.png)**sections at the top of the `config.lua`. Everything else is optional.**

> [**NEW: Auto Framework Detect!**](https://i.imgur.com/zNW8Kpg.png)
>
> We have added a new feature we are calling '**auto\_detect**', which will automatically identify your framework and SQL database resource, and apply the appropriate default settings.
> {% endhint %}

### **Step 3 -** SQL Database

{% hint style="warning" %}
**Insert Automatically?**

If you set **`Config.AutoInsertSQL`** in the `[cd_dispatch/configs/config.lua]` to **true**, the resource will automatically insert the SQL for you. You can set this to false after the SQL has been inserted successfully.

**Insert Manually?**

Alternatively, if you want to insert the SQL queries manually, you can find them [here](https://docs.codesign.pro/paid-scripts/dispatch/configs-locales-and-sql).
{% endhint %}

### Step 4 - Configure Key Binds

{% hint style="warning" %}
Before starting this resource on your main/live server, we highly advise configuring your key binds because this resource uses [Fivem's Key Mapping](https://docs.codesign.pro/helpful-guides/register-key-mapping).

**Where can I configure my key binds?**

You can configure key binds in the [Keys and Commands](https://i.imgur.com/bTvuXLZ.png) section near the bottom of the **`[cd_dispatch/configs/config.lua]`**.

> **Why do I need to do this?**
>
> Well long story short;- once a player has joined your server with this resource running you can no longer force change their key binds for this resource through the config.lua, only they can change it in the in-game [pause menu settings](https://imgur.com/GRWKelR). Although it will change for the players who join after you have changed it.
>
> The benefit of this system is that it's much more optimised and players can easily change their key binds on keyboards or controllers. You can also check out the [Default Keybinds](#default-keybinds) for this resource.
> {% endhint %}

### Step 5 - Add New Dispatch Alerts

{% hint style="warning" %}

> **Why do I need to do this?**
>
> Because you need to replace your old dispatch alerts with the new ones.

{% hint style="danger" %}
**Compatible Code Snippets Provided by Codesign**

On our [Dispatch Resource Integration](https://docs.codesign.pro/paid-scripts/garage/resource-integration) page, we provide photos, customized code snippets, and the exact lines to modify for full compatibility with ESX, QBCore and Paid Resources.

[Click here for ESX.](https://docs.codesign.pro/paid-scripts/dispatch/resource-integration#esx-resources)

[Click here for QBCore.](https://docs.codesign.pro/paid-scripts/dispatch/resource-integration#qbcore-resources)

[Click here for Paid Resources.](https://docs.codesign.pro/paid-scripts/dispatch/resource-integration#paid-resources)
{% endhint %}

**Example**

* Here is an example of replacing your old dispatch alerts with the new ones. Not every resource will look identical to this, but the general idea is the same.
  * [EXAMPLE:](https://i.imgur.com/bRxcgIt.png)
    * <mark style="color:red;">Red</mark> = Here is the old dispatch alert.
    * <mark style="color:green;">Green</mark> = The old dispatch alert has been replaced with the new one.

**Customise the dispatch notification**

* The code snippet below is formatted to give complete customisation for any scenario. Every single detail is documented.
  * [#A detailed guide for all variables used in the dispatch "code snippet".](#a-detailed-guide-for-all-variables-used-in-the-dispatch-code-snippet-.)
  * [#A detailed guide for all the data the client-side export returns.](https://docs.codesign.pro/paid-scripts/dispatch#a-detailed-guide-for-all-the-data-the-client-side-export-returns.)

{% tabs %}
{% tab title="client-side to server-side (recommended)" %}
**CODE SNIPPET:**

{% code lineNumbers="true" %}

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

{% endcode %}
{% endtab %}

{% tab title="server-side to client-side" %}
**CODE SNIPPET:**

{% code lineNumbers="true" %}

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

{% endcode %}
{% endtab %}
{% endtabs %}

### **Additional Information**

**Trigger from the client-side or server-side, but not both**

* Above we provide you with 2 different methods of triggering notifications; 1 from the client-side and 1 from the server-side. You DON’T need to use both to trigger the same dispatch alert. Choose 1 or the other, but we recommend using the client-side method as it’s simpler.

**Find where the action starts**

*For this example, I will reference a criminal and a police officer.*

* You need to trigger the event when the criminal is performing the action, not the police officer, because it will send the police officer's location, not the criminal's.
* You don’t want to trigger the new dispatch alert in the old dispatch alerts existing register event that gets triggered from the server-side and affects all police officers, as that will cause multiple of the same dispatch alerts to be sent.
  * [**EXAMPLE:**](https://i.imgur.com/UulUyD4.png)
    * <mark style="color:red;">Red</mark> = An example of a bad location to place the new dispatch alert because that event is coming from the server-side to the client-side, and all police officers will be receiving the same event, so it will result in spam duplicate notifications. A good indication of a bad location is when you see blips being created, and it does not trigger a server event.
    * <mark style="color:green;">Green</mark> = An example of a good location to place the new dispatch alert because there are no blips being created, and it triggers a server event.

**Summary**

* To summarise the above, find the part of the code where a player starts a robbery, place the new dispatch alert code snippet there, and cd\_dispatch will handle the rest.
  {% endhint %}

#### A detailed guide for all variables used in the dispatch "code snippet".

<table data-full-width="false"><thead><tr><th width="181">Variable Name</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>job_table</code></strong></td><td>Everyone who has this job will receive this dispatch alert. You can add multiple jobs to the table.</td></tr><tr><td><strong><code>coords</code></strong></td><td>These are the coordinates of the dispatch alert.</td></tr><tr><td><strong><code>title</code></strong></td><td>Usually, police 10 codes are used here in the title.</td></tr><tr><td><strong>message</strong></td><td>You can customise the message and add any available variables - <a href="https://docs.codesign.pro/paid-scripts/dispatch#a-detailed-guide-for-all-the-data-the-client-side-export-returns.">More Info</a>.</td></tr><tr><td><strong><code>flash</code></strong></td><td><p>To make this dispatch alert flash red and blue on the small and large UI. Used for high-priority calls such as panic buttons etc.</p><p><strong><code>1</code></strong> = enable UI flash.</p><p><strong><code>0</code></strong> = disable UI flash.</p></td></tr><tr><td><strong><code>unique_id</code></strong></td><td>DON’T change this.</td></tr><tr><td><strong><code>blip</code></strong></td><td><p>This sub-table allows you to customise the blip on the pause menu map/mini-map.</p><p></p><p>If you don't want to have a blip, just delete the whole blip sub-table. </p><p></p><p>Everything referred to as the blip below is related to the pause menu map/mini-map blips.</p></td></tr><tr><td><strong><code>blip.sprite</code></strong></td><td>The icon for the blip - <a href="https://docs.fivem.net/docs/game-references/blips/">More icons can be found here.</a></td></tr><tr><td><strong><code>blip.scale</code></strong></td><td>The size of the blip: <strong><code>0.1-2.0</code></strong>.</td></tr><tr><td><strong><code>blip.colour</code></strong></td><td>The colour of the blip - <a href="https://docs.fivem.net/docs/game-references/blips/">More colours can be found here at the bottom.</a></td></tr><tr><td><strong><code>blip.flashes</code></strong></td><td><p>To make this dispatch alerts blip flash. Used for high-priority calls such as panic buttons etc.</p><p><strong><code>true</code></strong> = enable blip flash.</p><p><strong><code>false</code></strong> = disable blip flash.</p></td></tr><tr><td><strong><code>blip.time</code></strong></td><td>(in minutes) The amount of time until the blip gradually fades and deletes.</td></tr><tr><td><strong><code>blip.sound</code></strong></td><td><p>The sound when receiving a new dispatch alert. You can change or add more sounds in the <code>BlipSound()</code> function in the <code>configs/client_customise_me.lua</code>.</p><p><strong><code>1</code></strong> = x1 sound alert.</p><p><strong><code>2</code></strong> = x2 sound alerts.</p><p><strong><code>3</code></strong> = panic button alert sound.</p></td></tr><tr><td><strong><code>blip.radius</code></strong></td><td><p>This will take the coordinates, randomize them, and add an area blip. The exact location will always be somewhere in the radius blip</p><p><strong><code>0</code></strong> = disable radius blip.</p><p><strong><code>50-100</code></strong> = is a good size, but you can go higher.</p></td></tr></tbody></table>

#### A detailed guide for all the data the client-side export returns.

{% hint style="warning" %}

> The export used in the code snippet above will return this table. This can be customised in the  `[client/main/functions.lua]` file.

{% tabs %}
{% tab title="Is the player on foot?" %}
{% code title="If the player is on foot then the export will return this:" overflow="wrap" %}

```lua
local data = exports['cd_dispatch']:GetPlayerInfo()

data.ped --The player's id: eg., 123456789.
data.coords --The players coordinates: eg., vector3(1.0, 2.0, 3.0).
data.street_1 --The street name: eg., “Palomino Ave”. 
data.street_2 --The streets area name: eg., “Legion Square”.
data.street --Both the street name & area name: eg., “Palomino Ave, Legion Square”.
data.sex --The players ped’s sex; eg., “Male”.
```

{% endcode %}
{% endtab %}

{% tab title="Is the player in a vehicle?" %}
{% code title="If the player is in a vehicle then the export will return this:" overflow="wrap" %}

```lua
local data = exports['cd_dispatch']:GetPlayerInfo()

data.ped --The player's id: eg., 123456789.
data.coords --The players coordinates: eg., vector3(1.0, 2.0, 3.0).
data.street_1 --The street name: eg., “Palomino Ave”. 
data.street_2 --The streets area name: eg., “Legion Square”.
data.street --Both the street name & area name: eg., “Palomino Ave, Legion Square”.
data.sex --The players ped’s sex; eg., “Male”.

data.vehicle --The vehicle id: eg., 123456789.
data.vehicle_label --The vehicle name: eg., “Audi RS7”.
data.vehicle_colour --The vehicles colour: eg., “Blue”.
data.vehicle_plate --The vehicles license plate: eg., “ABCD1234”.
data.heading --The vehicle's direction: eg., “North”.
data.speed --The vehicles speed: eg., “70MPH”.
```

{% endcode %}
{% endtab %}
{% endtabs %}
{% endhint %}

##

## OPTIONAL FEATURES

This section is to help you understand how the built-in features of this resource work and, if applicable, how you can make them compatible with other resources. These features are not required. They are optional and can be configured in the `[configs/config.lua]`.

### **Large UI Settings**

> **What do the settings do and how does this work?**
>
> This is where each player can customise settings to suit their own individual role-play needs.

**Status**

* The status shows other players what you are doing, such as available, unavailable, processing, training, undercover etc. It‘s displayed on the [“Units List”](https://imgur.com/a/DU78oGz), and each status displays a different colour. For example., green = available, red = unavailable and blue = training.

**Auto Delete**

* Each notification will auto-delete after x minutes to clear out old notifications.

**Update Callsign**

* This is how you update your callsign.

**Assigned Vehicle**

* This is used to show other players what type of vehicle you are currently using. It’s displayed on the [“Units List”](https://imgur.com/a/m6pf9LD) and the [pause-menu/mini-map blips](https://imgur.com/a/XKITw6x). Players must change this manually, as it won’t change automatically.

**Dispatcher Mode**

* This is where you enable dispatcher mode.

### **Radio Channels**

> **How do radio channels work?**
>
> We use radio channels to allow players to see which radio channels other players are on, and also to allow players to quickly join radio channels through the large UI.
>
> You will of course need to be using some sort of voip and radio resource. By default we have added compatibility with tokovoip, mumble and pmavoice.

**Where are the radio channels displayed?**

The radio channels are displayed in 2 places: on the [large UI](https://imgur.com/mv7zpMX) and the [pause-menu/mini-map blips](https://imgur.com/a/RZ3Z4KX).

This event needs to be triggered from your radio resource, specifically when a player (who has access to use the dispatch) joins/leaves/changes a radio channel, and it needs to send the players new radio channel in the first argument.

[**Example 1**](https://imgur.com/6j7wEYM)

[**Example 2**](https://imgur.com/a/0SjuLVZ)

{% tabs %}
{% tab title="client-side to server-side" %}
{% code title="RADIO\_CHANNEL\_HERE needs to be a string or a number." %}

```lua
TriggerServerEvent('cd_dispatch:GetRadioChannel', RADIO_CHANNEL_HERE)
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Duty System

> **How does the duty system work?**
>
> QBCore and ESX Legacy 1.6+ use built in duty system’s. We use this by default to require players who have the job to be on duty to use the dispatch.

{% hint style="info" %}
**Do you use QBCore or ESX Legacy 1.6+?**

Then you don't need to make any changes. We have already implemented this for you.
{% endhint %}

Using an external duty resource, you can use the events below to tell the dispatch when a player is on or off duty.

{% tabs %}
{% tab title="client-side to client-side" %}
{% code title="Boolean means (true or false)." %}

```lua
TriggerEvent('cd_dispatch:OnDutyChecks', BOOLEAN)
```

{% endcode %}
{% endtab %}

{% tab title="server-side to client-side" %}
{% code title="Boolean means (true or false)." %}

```lua
TriggerClientEvent('cd_dispatch:OnDutyChecks', source, BOOLEAN)
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Blips

> **How do the blips work?**
>
> Our built-in player blips feature allows all players of the job(s) you define in the `Config.Allowedjobs` table to see each other on the in-game pause-menu and mini-map.
>
> The blips show much more information than usual blip resources because it gets data from the dispatch UI; such as the players character name, callsign, radio channel and vehicle type. Blips also flash when a vehicles emergency lights are enabled.

{% hint style="warning" %}
**Possible Modifications are Required!**

If you use another player blips resource, you must disable it to use the built-in player blips feature; otherwise, they will conflict.

**Known player blip conflicts.**

{% tabs %}
{% tab title="qb-policejob" %}
Comment out this thread in `qb-policejob/server/main.lua/line 1097`.

<pre class="language-lua"><code class="lang-lua"><strong>-[[CreateThread(function()
</strong>    while true do
        Wait(5000)
        UpdateBlips()
    end
end)-]]
</code></pre>

{% endtab %}

{% tab title="esx\_policejob" %}
Disable this config option in `esx_policejob/config.lua/line 17`.

{% code title="" %}

```lua
Config.EnableJobBlip = false
```

{% endcode %}
{% endtab %}
{% endtabs %}
{% endhint %}

### Callsign

> **How do callsigns work?**
>
> Callsigns can only be changed in the settings on the large UI. Open the large UI, click the “settings” icon at the top of your screen and change your callsign.

### Dispatcher

> **How does the dispatcher system work?**
>
> Our dispatcher system allows dispatcher(s) to recieve calls and assign them to individual players. Only those with the pre-defined job(s) and job grade (defined in the `Config.Dispatcher`  table) can use this feature. While a player has dispatcher mode enabled, non-dispatchers will not recieve calls until a dispatcher assigns them one.

**How to enable dispatcher mode?**

* Open the large UI, click the “settings” icon at the top of your screen and click “Toggle dispatcher mode”. You don’t have the required job or grade if this option is not clickable.

**How to assign a unit/group to a call?**

* You must drag a unit/group from the “Unit List” (on the right side of your screen) onto a call in the “Notification List” (on the left side of your screen). You will see the unit(s) added to the “Units Responding”  on the call if assigned successfully. You must drag the unit/group from the drag icon (8 dots).

**How To assign all units to a call?**

* While the large UI is open, right-click on a call in the “Notification List” (on the left side of your screen), and click “Assign every unit to call”.

**How to speak on the radio while in the large UI?**

* While the large UI is open, click the “Toggle Voice ON” button (at the bottom right corner of your screen). When enabled, this button will change colour to white. To talk on the radio, press your radio's push-to-talk key.

**How to join/leave radio channels while in the large UI?**

* While the large UI is open, right-click on a unit in the “Unit List” (on the top right side of your screen) and click “Join radio channel”. Do the same thing to leave a radio channel but click “Leave radio channel”.

### Job Call Commands

> **How does the job call commands work?**
>
> When a civilian uses any of the job call commands such as `/911`, a notification will be sent to the police. You can configure multiple jobs to use this system. After receiving a job call, players in said job can respond to the civilian using the `/reply` chat command. Calls can also be anonymous if the `anonymous` option is set to true (does not show the caller's name or phone number and uses radius blips).

### Police Alerts

> **How does the police alerts work?**
>
> This dispatch includes 3 basic built-in police alerts: stolen car, gunshots and speed cameras.

{% hint style="info" %}
**Whitelisted Jobs**

Please note that when testing this, if your job is in the `whitelisted_jobs` table, you won’t be able to trigger events.
{% endhint %}

**Stolen Car Alerts**

* This alert is specifically for when a civilian tries to enter a locked vehicle or drags a ped out of their vehicle and steals it. If you use cd\_radar, bolos will be automatically added for the stolen vehicles.

**Gunshot Alerts**

* Weapons with silencers on won’t trigger an alert. If you use cd\_radar, bolos will be automatically added for vehicle gunshots.

**Speed Camera Alerts**

* Some speed cameras are already pre-configured. When a vehicle speeds through one of these speed camera areas, an alert will be sent to the police. You can also optionally send the player a fine automatically. If you use cd\_radar, bolos will be automatically added for speeding vehicles.

##

## INFORMATION

### Default Keybinds

These keys can be modified and/or disabled in the [Keys and Commands](https://i.imgur.com/bTvuXLZ.png) section of the `[configs/config.lua]`.

Please make sure you understand how [Key Mapping](https://docs.codesign.pro/coding-information/register-key-mapping) works.

<table data-header-hidden><thead><tr><th width="232">Key</th><th>Description</th></tr></thead><tbody><tr><td><strong>Key</strong></td><td><strong>Description</strong></td></tr><tr><td><strong><code>U</code></strong></td><td>Toggles the small dispatch UI.</td></tr><tr><td><strong><code>G</code></strong></td><td>Respond to a notification.</td></tr><tr><td><strong><code>Left/Right Arrows</code></strong></td><td>Scroll through the notifications on the small dispatch UI.</td></tr><tr><td><strong><code>L</code></strong></td><td>Opens the large dispatch UI.</td></tr><tr><td><strong><code>Up Arrow</code></strong></td><td>Ping your location to other players who have access to your dispatch.</td></tr><tr><td><strong><code>Down Arrow</code></strong></td><td>Press your panic button.</td></tr></tbody></table>

### Chat Commands

These chat commands can be renamed and/or disabled in the [Keys and Commands](https://i.imgur.com/bTvuXLZ.png) section of the `[configs/config.lua]`.

The exact usage for each command will be displayed in the chat suggestions when using the commands in-game.

<table><thead><tr><th width="229"></th><th></th></tr></thead><tbody><tr><td><strong>Command</strong></td><td><strong>Description</strong></td></tr><tr><td><strong><code>/dispatchsmall</code></strong></td><td>Toggles the small dispatch UI.</td></tr><tr><td><strong><code>/dispatchlarge</code></strong></td><td>Opens the large dispatch UI.</td></tr><tr><td><strong><code>/respond</code></strong></td><td>Respond to a notification.</td></tr><tr><td><strong><code>/movemode</code></strong></td><td>Allows you to move the small UI on your screen.</td></tr><tr><td><strong><code>/panic</code></strong></td><td>Press your panic button.</td></tr><tr><td><strong><code>/reply</code></strong></td><td>Reply to job calls such as /911 calls etc.</td></tr><tr><td><strong><code>/dispatchtest</code></strong></td><td>(Test Command) This is a test command which triggers a police notification.</td></tr><tr><td><strong><code>/dispatchping</code></strong></td><td>Ping your location to other players who have access to your dispatch.</td></tr></tbody></table>

### Events

These events are completely optional; you can use them if needed.

{% tabs %}
{% tab title="client-side to client-side" %}
**Panic Button**

{% code title="Activates the panic button." %}

```lua
TriggerEvent('cd_dispatch:PanicButtonEvent')
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Exports

These exports are completely optional; you can use them if needed.

{% tabs %}
{% tab title="client-side exports" %}
**Get Player Info**

{% code title="Returns useful information about a player which can be used for creating new dispatch notifications, as seen in step 5. (returns a table)." %}

```lua
exports['cd_dispatch']:GetPlayerInfo()
```

{% endcode %}

**Get Player Notifications**

{% code title="Returns all of a player's active dispatch notifications. (returns a table)." %}

```lua
exports['cd_dispatch']:GetPlayerNotifications()
```

{% endcode %}

**Get Players Dispatch Data**

{% code title="Returns a player's dispatch character data, eg., callsign, character name, status etc. (returns a table)." %}

```lua
exports['cd_dispatch']:GetPlayersDispatchData()
```

{% endcode %}

**Get Config**

{% code title="Returns the dispatch's full config.lua. (returns a table)." %}

```lua
exports['cd_dispatch']:GetConfig()
```

{% endcode %}
{% endtab %}

{% tab title="server-side exports" %}
**Get Players Dispatch Data**

{% code title="Returns a player's dispatch character data, eg., callsign, character name, status etc. (returns a table)" %}

```lua
exports['cd_dispatch']:GetPlayersDispatchData(source)
```

{% endcode %}

**Get Config**

{% code title="Returns the dispatch's full config.lua. (returns a table)." %}

```lua
exports['cd_dispatch']:GetConfig()
```

{% endcode %}
{% endtab %}
{% endtabs %}

##

## COMMON ISSUES

Please check out our [**Troubleshooting Guide**](https://docs.codesign.pro/coding-information/self-debugging#troubleshooting) before contacting our support.

🔔 <mark style="color:red;">**Folder Name**</mark> Make sure the name of the folder is `cd_dispatch`.

🔔 <mark style="color:red;">**Encrypted Files**</mark> Do not edit the encrypted files in any way.

> <mark style="color:red;">**SQL Default Value Error?**</mark>
>
> eg., if you see an error similar to this example when inserting an SQL query into your database - `“BLOB/TEXT column 'callsign' can't have a default value”`.
>
> {% code overflow="wrap" %}
>
> ```
> ✔️ You can use “VARCHAR(256)” instead of “LONGTEXT” in the SQL query.
> ```
>
> {% endcode %}

> <mark style="color:red;">**SQL Unknown Column Error?**</mark>
>
> eg.,  if you see an SQL error in the server console similar to this example - `ER_BAD_FIELD_ERROR: Unknown colum 'callsign' in 'where clause'`.
>
> {% code overflow="wrap" %}
>
> ```
> ✔️ You are missing one of the required database columns. The SQL file can be found in the "READ_ME_AFTER_PURCHASING" folder.
> ```
>
> {% endcode %}

> <mark style="color:red;">**Script Loading?**</mark>
>
> eg.,  if you see this notification at least 10-20 seconds after loading in or restarting the script - “The resource is still loading. Please try again in a few seconds”.
>
> {% code overflow="wrap" %}
>
> ```
> ✔️ There will usually be a server side error which will be pretty self explanatory, usually a database error or because your Config.FrameworkTriggers were not configured correctly.
> ```
>
> {% endcode %}

> <mark style="color:red;">**NUI "drawImage" error?**</mark>
>
> eg., if you see an error similar to [this](https://imgur.com/a/TTKcNvQ) in the client-side F8 console.
>
> {% code overflow="wrap" %}
>
> ```
> ✔️ This means you have chosen a blip colour that is not supported by default in: Config.lua/Config.BlipData/largeui_blip_colour. To fix this change it to one of the supported colours.
> ```
>
> {% endcode %}

> <mark style="color:red;">**Players are not recveving calls?**</mark>
>
> eg., if all of a sudden players are not longer recieving dispatch calls.
>
> <pre data-overflow="wrap"><code>✔️ This most likely means 1 or more players have enabled dispatcher mode, so only the dispatchers are recieving new calls. Please read more about how our dispatcher system works <a data-footnote-ref href="#user-content-fn-1">here</a>.
> </code></pre>

<mark style="color:red;">**Attempt to index a nil value (global 'lib')**</mark>

eg., this server or client error will happen when the script is trying to send a ox\_lib notification.

<pre data-overflow="wrap"><code>✔️ This is because our auto detect feature has detected ox_lib as the notification resource your server is using, but you must first uncomment the ox_lib line in the fxmanifest. <a data-footnote-ref href="#user-content-fn-2">Complete Step 1.</a>
</code></pre>

<mark style="color:red;">**Using lb-tablet and getting error code 3777**</mark>

eg., you use lb-tablet and keep getting client-side error code 3777.

{% code overflow="wrap" %}

```
✔️ This is because they try to modify our GetPlayerInfo export which breaks it. In lb-tablet/client/custom/functions/dispatchCompatibility.lua - remove this function AddCompatibilityExport("cd_dispatch", "GetPlayerInfo", function().
```

{% endcode %}

## ERROR CODES

If you see an error code not listed below, please open a script support ticket in the [Codesign Discord](https://discord.gg/codesign).

{% tabs %}
{% tab title="Server" %}
N/A
{% endtab %}

{% tab title="Client" %} <mark style="color:red;">**3777**</mark> - You need to update to at least v4.2.2+ to use the new format from [#Step 5](#step-5-integrate-into-your-resources) using the unique\_id variable.

<mark style="color:red;">**3651**</mark> - This error code can be ignored; it does not affect anything; it's just trying to delete a notification that has just been deleted.
{% endtab %}
{% endtabs %}

## CHANGELOG

> **Files Changed**
>
> Not every update requires you to replace the whole folder. We do this because we understand it's a pain to redo the configs for every update.

* **All Files -** This means you should delete your old `cd_dispatch` folder, download and add in the latest version, reconfigure the configs folder and restart your server.
* **All Files Except config.lua -** This means you should do all of the above (in the All Files section) but additionally **make a backup of the `config.lua`** file and replace the new config.lua file with the one you made a backup of.
* **Specific Files -** This means you can copy and paste the **SPECIFIC** new files over the old ones and restart the server.

{% hint style="warning" %}
**Skipping Updates**

If you are attempting to update to the latest version but have skipped previous updates, you should update all files just to be safe. For example., let's say you are currently on v4.0.1, you did not update when v4.0.2 was released, and now v4.0.3 is released, and you want to update; you should always use the “All Files” update method.
{% endhint %}

{% tabs %}
{% tab title="v4.3.11" %}

### 18/3/2026

**Files Changed:**&#x20;

* [ ] All Files
* [ ] All Files Except config.lua
* [x] Specific Files

```
fxmanifest.lua
server/main/anti_cheat.lua
server/main/server.lua
```

**Changelog:**

{% hint style="info" %}
**Changes**

* Further improvments to anti cheat.
  {% endhint %}
  {% endtab %}

{% tab title="v4.3.10" %}

### 16/3/2026

**Files Changed:**&#x20;

* [x] All Files
* [ ] All Files Except config.lua
* [ ] Specific Files

**Changelog:**

{% hint style="warning" %}
**Fixes**

* Further explot protection
* Auto ban modders on QBCore and Qbox.&#x20;
  {% endhint %}
  {% endtab %}

{% tab title="v4.3.9" %}

### 12/3/2026

**Files Changed:**&#x20;

* [ ] All Files
* [ ] All Files Except config.lua
* [x] Specific Files

<pre class="language-lua"><code class="lang-lua">fxmanifest.lua
server/main/server.lua
server/other/chat_commands.lua

<strong>configs/config.lua (added more banned words to config)
</strong><strong>banned_words = {'discord','fuck','fucker','fucking','shit','shitty','bullshit','cunt','bitch','bastard','asshole','arsehole','motherfucker','whore','slut','hoe','skank','retard','prick','twat','wanker','dipshit','shithead','fuckhead','asshat','fuk','fck','fuq','sh1t','b1tch','c*nt','f*ck','biatch','azzhole','a$$hole' } --A table of banned words. 
</strong></code></pre>

**Changelog:**

{% hint style="warning" %}
**Fixes**

* Further explot protection.
  {% endhint %}
  {% endtab %}
  {% endtabs %}

[^1]: <https://docs.codesign.pro/paid-scripts/dispatch#dispatcher>

[^2]: [https://docs.codesign.pro/paid-scripts/dispatch#step-1-fxmanifest](https://docs.codesign.pro/paid-scripts/dispatch#step-2-fxmanifest)
