# Installation

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

### Installation for QBCore

#### Step 1

First unzip the resource and put into resources folder.

#### Step 2

Insert this new tables

```sql
CREATE TABLE IF NOT EXISTS `origen_darkmarket_stock` (
  `id` INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
  `type` VARCHAR(255) NOT NULL, -- weapon, masks
  `object` VARCHAR(255) NOT NULL,
  `camo` VARCHAR(255),
  `rarity` VARCHAR(255),
  `stock` INTEGER NOT NULL,
  `available` INTEGER NOT NULL
);

CREATE TABLE IF NOT EXISTS `origen_darkmarket_camos` (
  `id` INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
  `citizenid` VARCHAR(255) NOT NULL,
  `camos` LONGTEXT
);

CREATE TABLE IF NOT EXISTS `origen_darkmarket_items` (
  `id` INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
  `citizenid` VARCHAR(255) NOT NULL,
  `items` LONGTEXT
);
```

#### Step 3

Put that export into your <mark style="color:blue;">**`qb-weapons`**</mark> resource into <mark style="color:blue;">**`clien.lua`**</mark> at the <mark style="color:blue;">**latest line.**</mark>

```lua
exports("GetSelectedWeapon", function()
    return CurrentWeaponData and CurrentWeaponData or nil  
end)
```

#### Step 4

Select the Framework

```lua
Config = Config or {}
Config.Language = "en" -- es, en, fr, it, zh
Config.Framework = "qbcore" -- auto, qbcore, esx
Config.Inventory = "qb-inventory"
Config.Debug = false
```

#### Step 5

Enjoy!! :smile:
{% endtab %}

{% tab title="ESX" %}

### Installation for ESX

#### Step 1

First unzip the resource and put into resources folder.

#### Step 2

Insert this new tables

```sql
CREATE TABLE IF NOT EXISTS `origen_darkmarket_stock` (
  `id` INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
  `type` VARCHAR(255) NOT NULL, -- weapon, masks
  `object` VARCHAR(255) NOT NULL,
  `camo` VARCHAR(255),
  `rarity` VARCHAR(255),
  `stock` INTEGER NOT NULL,
  `available` INTEGER NOT NULL
);

CREATE TABLE IF NOT EXISTS `origen_darkmarket_camos` (
  `id` INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
  `citizenid` VARCHAR(255) NOT NULL,
  `camos` LONGTEXT
);

CREATE TABLE IF NOT EXISTS `origen_darkmarket_items` (
  `id` INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
  `citizenid` VARCHAR(255) NOT NULL,
  `items` LONGTEXT
);
```

#### Step 3

Select the Framework in ESX

```lua
Config = Config or {}
Config.Language = "en" -- es, en, fr, it, zh
Config.Framework = "esx" -- auto, qbcore, esx
Config.Inventory = "qb-inventory"
Config.Debug = false
```

Step 4

Enjoy!! :smile:
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
We recommend uploading our script files without using FileZilla, as the upload process may corrupt our scripts. As a recommendation, please use WinSCP or other reliable programs to upload the files.
{% endhint %}
