> For the complete documentation index, see [llms.txt](https://docs.l2s.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.l2s.dev/assets-and-guides/dispatch/installation.md).

# Installation

## # STEP 1 - Check dependencies

Make sure you have installed all  [dependencies ](https://docs.l2s.dev/assets-and-guides/dispatch).

***

## # STEP 2 - Drag And Drop

1. Download your resource from FiveM’s [Keymaster](https://keymaster.fivem.net/assets).
2. Unzip the <mark style="color:red;">l2s-dispatch.zip</mark> & <mark style="color:red;">l2s-dispatch\_blips.zip (</mark>Optional<mark style="color:red;">)</mark> folder and place this folder in your server's resource folder.
3. Add the resource to your server configuration file (`server.cfg`): `ensure l2s-dispatch & ensure l2s-dispatch_blips`. If you're using a framework, make sure to place it below the framework resource (e.g., `qb-core`) and not above it.

<pre class="language-cfscript"><code class="lang-cfscript"><strong>ensure qb-core // for qb-core only
</strong><strong>ensure es_extended // for ESX only
</strong><strong>ensure l2s-dispatch
</strong><strong>ensure l2s-dispatch_blips // Optional (Working only with l2s-dispatch)
</strong></code></pre>

***

## # STEP 3 - SQL Database

Insert the SQL file to your database (Database.sql).

{% hint style="info" %}
ESX SQL is different from QBCore SQL
{% endhint %}

***

## # STEP 4 - SetUp Metadata (<mark style="color:red;">QBCore Only</mark>)

{% tabs %}
{% tab title="New Method" %}
If you have the last version of qb-core and (your metadata in config.lua) copy paste the code in this path:

<mark style="color:red;">qb-core/config.lua</mark>

```lua
        l2s_dispatch = {
            busy = false,
            dispatch = false,
            callsign = '000',
        },
```

<figure><img src="https://253583244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Ouu0TE6RGB2wJP79c1y%2Fuploads%2FanzFawefRvMeHGHG90FI%2Fimage.png?alt=media&amp;token=d58b38b1-2db8-4c59-9bb3-7c8eca51c631" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Old Method" %}
If you have the old method of metadata (your metadata in player.lua instead of config.lua) put it inside this path:

<mark style="color:red;">qb-core/server/player.lua</mark>

```lua
PlayerData.metadata['l2s_dispatch'] = PlayerData.metadata['l2s_dispatch'] or {
        ['busy'] = false,
        ['dispatch'] = false,
        ['callsign'] = '000',
}
```

<figure><img src="https://253583244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Ouu0TE6RGB2wJP79c1y%2Fuploads%2F1NoFSYPi4WtcEdzZpwzF%2Fimage.png?alt=media&amp;token=4088a739-b739-4190-b104-68ee9370547c" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="QBox" %}
If you use QBox Framework copy paste the code in this path:

<mark style="color:red;">qbx-core/server/player.lua</mark>

```lua
playerData.metadata['l2s_dispatch'] = playerData.metadata['l2s_dispatch'] or {
        ['busy'] = false,
        ['dispatch'] = false,
        ['callsign'] = '000',
}
```

{% endtab %}
{% endtabs %}

***

## # STEP 5 - Setup Items and Images

1- Setup  Item according to your inventory (if not exist)

{% tabs %}
{% tab title="qb-inventory" %}
Add Item in qb-core/shared/items.lua

```lua
["bodycam"] = {
    ["name"] = "bodycam",
    ["label"] = "Body Cam",
    ["weight"] = 500,
    ["type"] = "item",
    ["image"] = "bodycam.png",
    ["unique"] = true,
    ["useable"] = false,
    ["shouldClose"] = false,
    ["combinable"] = nil,
    ["description"] = "A wearable camera designed for recording first-person footage. Used for gathering evidence or monitoring activities in real"
},

```

{% endtab %}

{% tab title="ox\_inventory" %}
Add Item in ox\_inventory/data/items.lua

```lua
['bodycam'] = {
    label = 'Body Cam',
    weight = 500,
},
```

{% endtab %}

{% tab title="qs\_inventory" %}
Add Item in qb-core/shared/items.lua  or or  qs-inventory/config/metadata.js for <mark style="color:red;">esx</mark>

```lua
["bodycam"] = {
    ["name"] = "bodycam",
    ["label"] = "Body Cam",
    ["weight"] = 500,
    ["type"] = "item",
    ["image"] = "bodycam.png",
    ["unique"] = true,
    ["useable"] = false,
    ["shouldClose"] = false,
    ["combinable"] = nil,
    ["description"] = "A wearable camera designed for recording first-person footage. Used for gathering evidence or monitoring activities in real"
},
```

{% endtab %}
{% endtabs %}

2- Setup item Image according to your inventory

{% file src="/files/b946xWRJAaGPrDCDPXWJ" %}

***

## # STEP 6 - Configure API Keys in sh\_api

For more information, a special page has been created to explain each part of it

{% content-ref url="/pages/Qm0GAHp7VU0nHbrH1rJn" %}
[API](/assets-and-guides/dispatch/configuration/api.md)
{% endcontent-ref %}

## # STEP 7 - Dispatch Blips (Optional)

Only if you use <mark style="color:red;">l2s-dispatch\_blips</mark>  (Coming free with script), you'll need to disable it to enable the built-in player blips feature; otherwise, they may interfere with each other.

{% tabs %}
{% tab title="QBCore" %}
Comment this code in <mark style="color:red;">qb-policejob/server/main.lua</mark> line \~249

```lua
CreateThread(function()
    while true do
        Wait(5000)
        UpdateBlips()
    end
end)
```

{% endtab %}

{% tab title="ESX" %}
Disable this option in config <mark style="color:red;">esx\_policejob/config.lua</mark>

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

{% endtab %}
{% endtabs %}
