# Installation

***

## 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. :)


---

# 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.mosotoscripts.com/scripts/mst_seatbelt/installation.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.
