# Installation

***

## STEP 1 - Download

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

## STEP 2 - Dependencies

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

**Required:**

* [es\_extended](https://github.com/esx-framework/esx_core/tree/main/%5Bcore%5D/es_extended) or [qb-core](https://github.com/qbcore-framework/qb-core) or [qbx\_core](https://github.com/Qbox-project/qbx_core)
* [mst\_bridge](https://portal.cfx.re/assets/granted-assets)

**Optional:**

* &#x20;[ox\_lib](https://github.com/communityox/ox_lib/releases) (only required if you want to use the progress bars)

## STEP 3 - Resources order

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

<pre data-title="SERVER.CFG"><code>ensure es_extended/qb-core/qbx_core
ensure mst_bridge
<strong>ensure mst_breathalyzer
</strong></code></pre>

## STEP 4 - Database

{% hint style="danger" %}
Without adding these items to the database, the script will not work!
{% endhint %}

* Add the images from the `inventory_images` folder inside `mst_breathalyzer` to your inventory system’s image directory.

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

```sql
DELETE FROM items WHERE name = 'breathalyzer';
DELETE FROM items WHERE name = 'whiskey';
DELETE FROM items WHERE name = 'vodka';
DELETE FROM items WHERE name = 'rum';
DELETE FROM items WHERE name = 'brandy';
DELETE FROM items WHERE name = 'tequila';
DELETE FROM items WHERE name = 'champagne';
DELETE FROM items WHERE name = 'red_wine';
DELETE FROM items WHERE name = 'white_wine';
DELETE FROM items WHERE name = 'rose';
DELETE FROM items WHERE name = 'beer';
DELETE FROM items WHERE name = 'yogurt';

INSERT INTO `items` (`name`, `label`, `weight`) VALUES
	('breathalyzer', 'Breathalyzer', 1),
	('whiskey', 'Whiskey', 1),
	('vodka', 'Vodka', 1),
	('rum', 'Rum', 1),
	('brandy', 'Brandy', 1),
	('tequila', 'Tequila', 1),
	('champagne', 'Champagne', 1),
	('red_wine', 'Red Wine', 1),
	('white_wine', 'White Wine', 1),
	('rose', 'Rose', 1),
	('beer', 'Beer', 1),
	('yogurt', 'Yogurt', 1)
;
```

{% endtab %}

{% tab title="QB" %}

```lua
breathalyzer = { name = 'breathalyzer', label = 'Breathalyzer', weight = 1, type = 'item', image = 'breathalyzer.png', unique = false, useable = true, shouldClose = true, description = 'Check someone\'s blood alcohol level' },
whiskey = { name = 'whiskey', label = 'Whiskey', weight = 1, type = 'item', image = 'whiskey.png', unique = false, useable = true, shouldClose = true, description = 'A strong drink for a strong person' },
vodka = { name = 'vodka', label = 'Vodka', weight = 1, type = 'item', image = 'vodka.png', unique = false, useable = true, shouldClose = true, description = 'Clear and powerful spirit' },
rum = { name = 'rum', label = 'Rum', weight = 1, type = 'item', image = 'rum.png', unique = false, useable = true, shouldClose = true, description = 'Sweet spirit from sugarcane' },
brandy = { name = 'brandy', label = 'Brandy', weight = 1, type = 'item', image = 'brandy.png', unique = false, useable = true, shouldClose = true, description = 'Smooth, aged liquor' },
tequila = { name = 'tequila', label = 'Tequila', weight = 1, type = 'item', image = 'tequila.png', unique = false, useable = true, shouldClose = true, description = 'Mexican spirit made from agave' },
champagne = { name = 'champagne', label = 'Champagne', weight = 1, type = 'item', image = 'champagne.png', unique = false, useable = true, shouldClose = true, description = 'Celebrate with bubbles' },
red_wine = { name = 'red_wine', label = 'Red Wine', weight = 1, type = 'item', image = 'red_wine.png', unique = false, useable = true, shouldClose = true, description = 'A glass of rich red wine' },
white_wine = { name = 'white_wine', label = 'White Wine', weight = 1, type = 'item', image = 'white_wine.png', unique = false, useable = true, shouldClose = true, description = 'A crisp, light wine' },
rose = { name = 'rose', label = 'Rose', weight = 1, type = 'item', image = 'rose.png', unique = false, useable = true, shouldClose = true, description = 'A pink wine for sunny days' },
beer = { name = 'beer', label = 'Beer', weight = 1, type = 'item', image = 'beer.png', unique = false, useable = true, shouldClose = true, description = 'Cold and refreshing pint' },
yogurt = { name = 'yogurt', label = 'Yogurt', weight = 1, type = 'item', image = 'yogurt.png', unique = false, useable = true, shouldClose = true, description = 'Helps reduce alcohol effects' },
```

{% endtab %}

{% tab title="OX" %}

```lua
['breathalyzer'] = {
    label = 'Breathalyzer',
    weight = 1000,
    stack = true,
    close = true,
    description = 'Check someone\'s blood alcohol level',
    client = {
        image = 'breathalyzer.png'
    }
},

['whiskey'] = {
    label = 'Whiskey',
    weight = 1000,
    stack = true,
    close = true,
    description = 'A strong drink for a strong person',
    client = {
        image = 'whiskey.png'
    }
},

['vodka'] = {
    label = 'Vodka',
    weight = 1000,
    stack = true,
    close = true,
    description = 'Clear and powerful spirit',
    client = {
        image = 'vodka.png'
    }
},

['rum'] = {
    label = 'Rum',
    weight = 1000,
    stack = true,
    close = true,
    description = 'Sweet spirit from sugarcane',
    client = {
        image = 'rum.png'
    }
},

['brandy'] = {
    label = 'Brandy',
    weight = 1000,
    stack = true,
    close = true,
    description = 'Smooth, aged liquor',
    client = {
        image = 'brandy.png'
    }
},

['tequila'] = {
    label = 'Tequila',
    weight = 1000,
    stack = true,
    close = true,
    description = 'Mexican spirit made from agave',
    client = {
        image = 'tequila.png'
    }
},

['champagne'] = {
    label = 'Champagne',
    weight = 1000,
    stack = true,
    close = true,
    description = 'Celebrate with bubbles',
    client = {
        image = 'champagne.png'
    }
},

['red_wine'] = {
    label = 'Red Wine',
    weight = 1000,
    stack = true,
    close = true,
    description = 'A glass of rich red wine',
    client = {
        image = 'red_wine.png'
    }
},

['white_wine'] = {
    label = 'White Wine',
    weight = 1000,
    stack = true,
    close = true,
    description = 'A crisp, light wine',
    client = {
        image = 'white_wine.png'
    }
},

['rose'] = {
    label = 'Rose',
    weight = 1000,
    stack = true,
    close = true,
    description = 'A pink wine for sunny days',
    client = {
        image = 'rose.png'
    }
},

['beer'] = {
    label = 'Beer',
    weight = 1000,
    stack = true,
    close = true,
    description = 'Cold and refreshing pint',
    client = {
        image = 'beer.png'
    }
},

['yogurt'] = {
    label = 'Yogurt',
    weight = 1000,
    stack = true,
    close = true,
    description = 'Helps reduce alcohol effects',
    client = {
        image = 'yogurt.png'
    }
},
```

{% endtab %}

{% tab title="TGIANN" %}
{% code fullWidth="false" %}

```lua
breathalyzer = { label = "Breathalyzer", weight = 1, type = "item", image = "breathalyzer.png", unique = false, useable = true, shouldClose = true, description = "Check someone's blood alcohol level" },
whiskey = { label = "Whiskey", weight = 1, type = "item", image = "whiskey.png", unique = false, useable = true, shouldClose = true, description = "A strong drink for a strong person" },
vodka = { label = "Vodka", weight = 1, type = "item", image = "vodka.png", unique = false, useable = true, shouldClose = true, description = "Clear and powerful spirit" },
rum = { label = "Rum", weight = 1, type = "item", image = "rum.png", unique = false, useable = true, shouldClose = true, description = "Sweet spirit from sugarcane" },
brandy = { label = "Brandy", weight = 1, type = "item", image = "brandy.png", unique = false, useable = true, shouldClose = true, description = "Smooth, aged liquor" },
tequila = { label = "Tequila", weight = 1, type = "item", image = "tequila.png", unique = false, useable = true, shouldClose = true, description = "Mexican spirit made from agave" },
champagne = { label = "Champagne", weight = 1, type = "item", image = "champagne.png", unique = false, useable = true, shouldClose = true, description = "Celebrate with bubbles" },
red_wine = { label = "Red Wine", weight = 1, type = "item", image = "red_wine.png", unique = false, useable = true, shouldClose = true, description = "A glass of rich red wine" },
white_wine = { label = "White Wine", weight = 1, type = "item", image = "white_wine.png", unique = false, useable = true, shouldClose = true, description = "A crisp, light wine" },
rose = { label = "Rose", weight = 1, type = "item", image = "rose.png", unique = false, useable = true, shouldClose = true, description = "A pink wine for sunny days" },
beer = { label = "Beer", weight = 1, type = "item", image = "beer.png", unique = false, useable = true, shouldClose = true, description = "Cold and refreshing pint" },
yogurt = { label = "Yogurt", weight = 1, type = "item", image = "yogurt.png", unique = false, useable = true, shouldClose = true, description = "Helps reduce alcohol effects" },
```

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

## STEP 5 - 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_breathalyzer/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.
