# Installation

***

## STEP 1 - Download

* Download **mst\_fpscanner** 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/\[core]/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)
* [ox\_lib](https://github.com/communityox/ox_lib/releases)
* [qb-target](https://github.com/qbcore-framework/qb-target) or [ox\_target](https://github.com/communityox/ox_target/releases)
* [screenshot-basic](https://github.com/citizenfx/screenshot-basic)

## 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 ox_lib
ensure es_extended/qb-core/qbx_core
ensure qb-target/ox_target
ensure screenshot-basic
ensure mst_bridge
<strong>ensure mst_fpscanner
</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_fpscanner` to your inventory system’s image directory.

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

```sql
DELETE FROM items WHERE name = 'mobilescanner';
DELETE FROM items WHERE name = 'staticscanner';

INSERT INTO `items` (`name`, `label`, `weight`) VALUES
	('mobilescanner', 'Mobile Fingerprint Scanner', 1),
	('staticscanner', 'Static Fingerprint Scanner', 1)
;
```

{% endtab %}

{% tab title="QB" %}

```lua
mobilescanner = { name = 'mobilescanner', label = 'Mobile Fingerprint Scanner', weight = 1, type = 'item', image = 'mobilescanner.png', unique = true, useable = true, shouldClose = true, description = 'A portable device used to scan fingerprints on the go' },
staticscanner = { name = 'staticscanner', label = 'Static Fingerprint Scanner', weight = 1, type = 'item', image = 'staticscanner.png', unique = true, useable = true, shouldClose = true, description = 'A stationary fingerprint scanner that can be placed in a location' },
```

{% endtab %}

{% tab title="OX" %}

```lua
['mobilescanner'] = {
    label = 'Mobile Fingerprint Scanner',
    weight = 1000,
    stack = false,
    close = true,
    description = 'A portable device used to scan fingerprints on the go',
    client = {
        image = 'mobilescanner.png'
    }
},

['staticscanner'] = {
    label = 'Static Fingerprint Scanner',
    weight = 2000,
    stack = false,
    close = true,
    description = 'A stationary fingerprint scanner that can be placed in a location',
    client = {
        image = 'staticscanner.png'
    }
}
```

{% endtab %}

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

```lua
mobilescanner = { label = "Mobile Fingerprint Scanner", weight = 1, type = "item", image = "mobilescanner.png", unique = true, useable = true, shouldClose = true, description = "A portable device used to scan fingerprints on the go" },
staticscanner = { label = "Static Fingerprint Scanner", weight = 1, type = "item", image = "staticscanner.png", unique = true, useable = true, shouldClose = true, description = "A stationary fingerprint scanner that can be placed in a location" },
```

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

## STEP 5 - Fivemanage Setup

{% hint style="info" %}
To store each citizen's photos, we use [Fivemanage](https://refer.fivemanage.com/simeon) as platform for them.
{% endhint %}

1. Open [Fivemanage](https://refer.fivemanage.com/simeon)
2. Create an account
3. Go to "Tokens" in the sidebar and then "Create Token"
4. Choose a name and "Images only" type from the dropdown
5. Finish with "Create Token"
6. Add <kbd>setr FIVEMANAGE\_MEDIA\_API\_KEY yourToken</kbd> in server.cfg below `mysql_connection_string` for example
7. Copy the token you made and put it in place of `yourToken`
8. Save the changes and restart your server

## STEP 6 - Any other configurations?

{% hint style="success" %}
At Mosoto Scripts, we are constantly improving our resources, and for this reason you do not need to run the SQL manually, this happens automatically when you run the script for the first time.
{% endhint %}

{% hint style="info" %}
You will also no longer have to change the framework manually, for each script, as well as the language, notifications, etc. Everything happens through the `config.lua` file of **mst\_bridge**.
{% endhint %}

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