> For the complete documentation index, see [llms.txt](https://docs.mosotoscripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mosotoscripts.com/scripts/mst_seatbelt/installation.md).

# Installation

If you aren't familiar with programming or just you don't know how to set up the script, we present our installation guide which is as comprehensive as possible so you don't have any difficulties.

***

## STEP 1 - Download

* Download **mst\_seatbelt** from [Portal](https://portal.cfx.re/assets/granted-assets).

## STEP 2 - Dependencies

{% hint style="info" %}
The script requires a dependency to function properly.
{% endhint %}

**Required:**

* [interact-sound](https://github.com/plunkettscott/interact-sound)

## STEP 3 - Resources order

{% hint style="info" %}
You MUST start the resource below your core and interact-sound!
{% endhint %}

<pre data-title="SERVER.CFG"><code>ensure es_extended/qb-core/qbx_core
ensure interact-sound
<strong>ensure mst_seatbelt
</strong></code></pre>

## STEP 4 - Drag & Drop Sounds

{% hint style="danger" %}
Without adding these sounds to the interact-sound resource, the script will not work properly!
{% endhint %}

* Drag sound files from `mst_seatbelt/sounds` folder to `interact-sound/client/html/sounds` folder.

**Don't forget** to change `'client/html/sounds/demo.ogg'` with `'client/html/sounds/*.ogg'`.

<pre class="language-lua" data-title="interact-sound/fxmanifest.lua"><code class="lang-lua">files {
    'client/html/index.html',
    -- Begin Sound Files Here...
    -- client/html/sounds/ ... .ogg
<strong>    'client/html/sounds/*.ogg'
</strong>}
</code></pre>

{% hint style="warning" %}
It is possible that your server has an **old version** of interact-sound installed, so if the sounds are not working, it is **recommended** to download this version - [**interact-sound**](https://github.com/mosotoscripts/interact-sound), but **don't forget** to **add the sounds to the correct place** `interact-sound/client/html/sounds`.
{% endhint %}

## STEP 5 - Remove Other Seatbelt Resources

{% hint style="info" %}
For the script to run without problems, there should be no other resources connected to the seatbelt.
{% endhint %}

{% tabs %}
{% tab title="ESX" %}

* Go to `esx_cruisecontrol/config.lua` and turn off the **Seatbelt** configuration.

<pre class="language-lua"><code class="lang-lua">Seatbelt = {
<strong>        Enable = false, -- Must be false
</strong>        Key = "B",
        EjectCheckSpeed = 45,
        RagdollTime = 1,
        Export = function (state)
            exports[Config.HudResource]:SeatbeltState(state)
        end
}
</code></pre>

{% endtab %}

{% tab title="QBCore" %}
Go to `qb-smallresources/client` and **remove** `seatbelt.lua`.
{% endtab %}

{% tab title="Qbox" %}

* Remove **qbx\_seatbelt** resource.
  {% endtab %}
  {% endtabs %}

## STEP 6 - Not working?

We hope you won’t need this step, but if you do, feel free to join our [**Discord**](https://discord.mosotoscripts.com) and open a support ticket. :)
