# Installation

### DEPENDENCIES

> **REQUIRED DEPENDENCIES**

<table data-full-width="false"><thead><tr><th>Resource</th><th>Download</th></tr></thead><tbody><tr><td>Apex Library</td><td><a href="https://astudios.tebex.io/package/5541419">Apex Studios Tebex Store</a></td></tr><tr><td>Framework</td><td><a href="https://github.com/qbcore-framework/qb-core">QBCore</a> or <a href="https://github.com/esx-framework/esx_core">ESX</a></td></tr><tr><td>Target</td><td><a href="https://github.com/qbcore-framework/qb-target">qb-target</a> / <a href="https://github.com/overextended/ox_target">ox_target</a></td></tr><tr><td>Menu</td><td><a href="https://github.com/qbcore-framework/qb-menu">qb-menu</a> &#x26; <a href="https://github.com/qbcore-framework/qb-input">qb-input</a> / <a href="https://github.com/overextended/ox_lib">ox_lib</a></td></tr><tr><td>Inventory</td><td><ul><li><a href="https://github.com/qbcore-framework/qb-inventory">qb-inventory</a></li><li><a href="https://github.com/loljoshie/lj-inventory">lj-inventory</a></li><li><a href="https://github.com/Project-Sloth/ps-inventory">ps-inventory</a></li><li><a href="https://github.com/overextended/ox_inventory">ox_inventory</a></li><li><a href="https://buy.quasar-store.com/category/2395209">Quasar Inventory</a></li></ul></td></tr></tbody></table>

> **OPTIONAL DEPENDENCIES**

| Resource | Download                                                                                   |
| -------- | ------------------------------------------------------------------------------------------ |
| Mapping  | [Map4all](https://fivem.map4all-shop.com/package/5411284) (Also available in subscription) |

### RESOURCE INSTALLATION GUIDE

> **1) RESOURCE DOWNLOAD**

{% hint style="info" %}
Download your resource from [FiveM's Keymaster](https://keymaster.fivem.net/asset-grants).
{% endhint %}

> **2) RESOURCE POSITIONING**

{% hint style="info" %}
**You need  to make sure that apex\_lib is always started before any of our scripts!**

```lua
ensure apex_lib
ensure [apex] -- or ensure apex_weaponmanufacturer
```

{% endhint %}

> **3) ASSET ADDING**

{% hint style="info" %}

1. Open apex\_weaponmanufacturer > assets > inventory\_images
2. Copy files from the folder and add them into your inventory image folder
   {% endhint %}

> **4) ITEM ADDING (QBCORE & ESX)**

{% tabs %}
{% tab title="QBCore" %}
{% hint style="info" %}

```lua
['weapon_case']                     = {['name'] = 'weapon_case',                    ['label'] = 'Weapon Case',               ['weight'] = 30, ['type'] = 'item', ['image'] = 'weapon_case.png',                    ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Case for something'}, 
['weapon_blueprint_pistol']         = {['name'] = 'weapon_blueprint_pistol',        ['label'] = 'Pistol Blueprint',          ['weight'] = 30, ['type'] = 'item', ['image'] = 'weapon_blueprint_pistol.png',        ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A blueprint?'}, 
['weapon_blueprint_snspistol']      = {['name'] = 'weapon_blueprint_snspistol',     ['label'] = 'SNS Pistol Blueprint',      ['weight'] = 30, ['type'] = 'item', ['image'] = 'weapon_blueprint_snspistol.png',     ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A blueprint?'}, 
['weapon_blueprint_vintagepistol']  = {['name'] = 'weapon_blueprint_vintagepistol', ['label'] = 'Vintage Pistol Blueprint',  ['weight'] = 30, ['type'] = 'item', ['image'] = 'weapon_blueprint_vintagepistol.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A blueprint?'}, 
['weapon_blueprint_appistol']       = {['name'] = 'weapon_blueprint_appistol',      ['label'] = 'AP Pistol Blueprint',       ['weight'] = 30, ['type'] = 'item', ['image'] = 'weapon_blueprint_appistol.png',      ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A blueprint?'}, 
['weapon_blueprint_pistol50']       = {['name'] = 'weapon_blueprint_pistol50',      ['label'] = 'Pistol 50 Blueprint',       ['weight'] = 30, ['type'] = 'item', ['image'] = 'weapon_blueprint_pistol50.png',      ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A blueprint?'}, 
['weapon_blueprint_heavypistol']    = {['name'] = 'weapon_blueprint_heavypistol',   ['label'] = 'Heavy Pistol Blueprint',    ['weight'] = 30, ['type'] = 'item', ['image'] = 'weapon_blueprint_heavypistol.png',   ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A blueprint?'}, 
['weapon_blueprint_microsmg']       = {['name'] = 'weapon_blueprint_microsmg',      ['label'] = 'Micro SMG Blueprint',       ['weight'] = 30, ['type'] = 'item', ['image'] = 'weapon_blueprint_microsmg.png',      ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A blueprint?'}, 
['weapon_blueprint_minismg']        = {['name'] = 'weapon_blueprint_minismg',       ['label'] = 'Mini SMG Blueprint',        ['weight'] = 30, ['type'] = 'item', ['image'] = 'weapon_blueprint_minismg.png',       ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A blueprint?'}, 
['weapon_blueprint_sawnoffshotgun'] = {['name'] = 'weapon_blueprint_sawnoffshotgun',['label'] = 'Sawnoff Shotgun Blueprint', ['weight'] = 30, ['type'] = 'item', ['image'] = 'weapon_blueprint_sawnoffshotgun.png',['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A blueprint?'}, 
['weapon_blueprint_assaultrifle']   = {['name'] = 'weapon_blueprint_assaultrifle',  ['label'] = 'Assault Rifle Blueprint',   ['weight'] = 30, ['type'] = 'item', ['image'] = 'weapon_blueprint_assaultrifle.png',  ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A blueprint?'}, 
['pistol_frame']                    = {['name'] = 'pistol_frame',                   ['label'] = 'Pistol Frame',              ['weight'] = 30, ['type'] = 'item', ['image'] = 'pistol_frame.png',                   ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A frame?'}, 
['snspistol_frame']                 = {['name'] = 'snspistol_frame',                ['label'] = 'SNS Pistol Frame',          ['weight'] = 30, ['type'] = 'item', ['image'] = 'snspistol_frame.png',                ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A frame?'}, 
['vintagepistol_frame']             = {['name'] = 'vintagepistol_frame',            ['label'] = 'Vintage Pistol Frame',      ['weight'] = 30, ['type'] = 'item', ['image'] = 'vintagepistol_frame.png',            ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A frame?'}, 
['appistol_frame']                  = {['name'] = 'appistol_frame',                 ['label'] = 'AP Pistol Frame',           ['weight'] = 30, ['type'] = 'item', ['image'] = 'appistol_frame.png',                 ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A frame?'}, 
['pistol50_frame']                  = {['name'] = 'pistol50_frame',                 ['label'] = 'Pistol 50 Frame',           ['weight'] = 30, ['type'] = 'item', ['image'] = 'pistol50_frame.png',                 ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A frame?'}, 
['heavypistol_frame']               = {['name'] = 'heavypistol_frame',              ['label'] = 'Heavy Pistol Frame',        ['weight'] = 30, ['type'] = 'item', ['image'] = 'heavypistol_frame.png',              ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A frame?'}, 
['microsmg_frame']                  = {['name'] = 'microsmg_frame',                 ['label'] = 'Micro SMG Frame',           ['weight'] = 30, ['type'] = 'item', ['image'] = 'microsmg_frame.png',                 ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A frame?'}, 
['minismg_frame']                   = {['name'] = 'minismg_frame',                  ['label'] = 'Mini SMG Frame',            ['weight'] = 30, ['type'] = 'item', ['image'] = 'minismg_frame.png',                  ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A frame?'}, 
['sawnoffshotgun_frame']            = {['name'] = 'sawnoffshotgun_frame',           ['label'] = 'Sawnoff Shotgun Frame',     ['weight'] = 30, ['type'] = 'item', ['image'] = 'sawnoffshotgun_frame.png',           ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A frame?'}, 
['assaultrifle_frame']              = {['name'] = 'assaultrifle_frame',             ['label'] = 'Assault Rifle Frame',       ['weight'] = 30, ['type'] = 'item', ['image'] = 'assaultrifle_frame.png',             ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A frame?'}, 
['brass']                           = {['name'] = 'brass',                          ['label'] = 'Brass',                     ['weight'] = 30, ['type'] = 'item', ['image'] = 'brass.png',                          ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Crafting Material'}, 
['gunpowder']                       = {['name'] = 'gunpowder',                      ['label'] = 'Gunpowder',                 ['weight'] = 30, ['type'] = 'item', ['image'] = 'gunpowder.png',                      ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Powder?'}, 
['pistol']                          = {['name'] = 'pistol',                         ['label'] = 'Pistol Model',              ['weight'] = 30, ['type'] = 'item', ['image'] = 'pistol.png',                         ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Nice Model?'}, 
['snspistol']                       = {['name'] = 'snspistol',                      ['label'] = 'SNS Pistol Model',          ['weight'] = 30, ['type'] = 'item', ['image'] = 'snspistol.png',                      ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Nice Model?'}, 
['vintagepistol']                   = {['name'] = 'vintagepistol',                  ['label'] = 'Vintage Pistol Model',      ['weight'] = 30, ['type'] = 'item', ['image'] = 'vintagepistol.png',                  ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Nice Model?'}, 
['appistol']                        = {['name'] = 'appistol',                       ['label'] = 'AP Pistol Model',           ['weight'] = 30, ['type'] = 'item', ['image'] = 'appistol.png',                       ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Nice Model?'}, 
['pistol50']                        = {['name'] = 'pistol50',                       ['label'] = 'Pistol 50 Model',           ['weight'] = 30, ['type'] = 'item', ['image'] = 'pistol50.png',                       ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Nice Model?'}, 
['heavypistol']                     = {['name'] = 'heavypistol',                    ['label'] = 'Heavy Pistol Model',        ['weight'] = 30, ['type'] = 'item', ['image'] = 'heavypistol.png',                    ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Nice Model?'}, 
['microsmg']                        = {['name'] = 'microsmg',                       ['label'] = 'Micro SMG Model',           ['weight'] = 30, ['type'] = 'item', ['image'] = 'microsmg.png',                       ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Nice Model?'}, 
['minismg']                         = {['name'] = 'minismg',                        ['label'] = 'Mini SMG Model',            ['weight'] = 30, ['type'] = 'item', ['image'] = 'minismg.png',                        ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Nice Model?'}, 
['sawnoffshotgun']                  = {['name'] = 'sawnoffshotgun',                 ['label'] = 'Sawnoff Shotgun Model',     ['weight'] = 30, ['type'] = 'item', ['image'] = 'sawnoffshotgun.png',                 ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Nice Model?'}, 
['assaultrifle']                    = {['name'] = 'assaultrifle',                   ['label'] = 'Assault Rifle Model',       ['weight'] = 30, ['type'] = 'item', ['image'] = 'assaultrifle.png',                   ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Nice Model?'},
```

{% endhint %}
{% endtab %}

{% tab title="ESX" %}
{% hint style="info" %}

```sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('weapon_case', 'Weapon Case', 10, 0, 1),
('weapon_blueprint_pistol', 'Pistol Blueprint', 10, 0, 1),
('weapon_blueprint_snspistol', 'SNS Pistol Blueprint', 10, 0, 1),
('weapon_blueprint_vintagepistol', 'Vintage Pistol Blueprint', 10, 0, 1),
('weapon_blueprint_appistol', 'AP Pistol Blueprint', 10, 0, 1),
('weapon_blueprint_pistol50', 'Pistol 50 Blueprint', 10, 0, 1),
('weapon_blueprint_heavypistol', 'Heavy Pistol Blueprint', 10, 0, 1),
('weapon_blueprint_microsmg', 'Micro SMG Blueprint', 10, 0, 1),
('weapon_blueprint_minismg', 'Mini SMG Blueprint', 10, 0, 1),
('weapon_blueprint_sawnoffshotgun', 'Sawnoff Shotgun Blueprint', 10, 0, 1),
('weapon_blueprint_assaultrifle', 'Assault Rifle Blueprint', 10, 0, 1),
('pistol_frame', 'Pistol Frame', 10, 0, 1),
('snspistol_frame', 'SNS Pistol Frame', 10, 0, 1),
('vintagepistol_frame', 'Vintage Pistol Frame', 10, 0, 1),
('appistol_frame', 'AP Pistol Frame', 10, 0, 1),
('pistol50_frame', 'Pistol 50 Frame', 10, 0, 1),
('heavypistol_frame', 'Heavy Pistol Frame', 10, 0, 1),
('microsmg_frame', 'Micro SMG Frame', 10, 0, 1),
('minismg_frame', 'Mini SMG Frame', 10, 0, 1),
('sawnoffshotgun_frame', 'Sawnoff Shotgun Frame', 10, 0, 1),
('assaultrifle_frame', 'Assault Rifle Frame', 10, 0, 1),
('brass', 'Brass', 10, 0, 1),
('gunpowder', 'Gunpowder', 10, 0, 1),
('pistol', 'Pistol Model', 10, 0, 1),
('snspistol', 'SNS Pistol Model', 10, 0, 1),
('vintagepistol', 'Vintage Pistol Model', 10, 0, 1),
('appistol', 'AP Pistol Model', 10, 0, 1),
('pistol50', 'Pistol 50 Model', 10, 0, 1),
('heavypistol', 'Heavy Pistol Model', 10, 0, 1),
('microsmg', 'Micro SMG Model', 10, 0, 1),
('minismg', 'Mini SMG Model', 10, 0, 1),
('sawnoffshotgun', 'Sawnoff Shotgun Model', 10, 0, 1),
('assaultrifle', 'Assault Rifle Model', 10, 0, 1)
```

{% endhint %}
{% endtab %}

{% tab title="OX" %}
{% hint style="info" %}

```lua
['weapon_case'] =                     {label = 'Weapon Case',               weight = 5, stack = true, close = false, description = "Case for something", image = "weapon_case.png"},
['weapon_blueprint_pistol'] =         {label = 'Pistol Blueprint',          weight = 5, stack = true, close = false, description = "A blueprint?",       image = "weapon_blueprint_pistol.png"},
['weapon_blueprint_snspistol'] =      {label = 'SNS Pistol Blueprint',      weight = 5, stack = true, close = false, description = "A blueprint?",       image = "weapon_blueprint_snspistol.png"},
['weapon_blueprint_vintagepistol'] =  {label = 'Vintage Pistol Blueprint',  weight = 5, stack = true, close = false, description = "A blueprint?",       image = "weapon_blueprint_vintagepistol.png"},
['weapon_blueprint_appistol'] =       {label = 'AP Pistol Blueprint',       weight = 5, stack = true, close = false, description = "A blueprint?",       image = "weapon_blueprint_appistol.png"},
['weapon_blueprint_pistol50'] =       {label = 'Pistol 50 Blueprint',       weight = 5, stack = true, close = false, description = "A blueprint?",       image = "weapon_blueprint_pistol50.png"},
['weapon_blueprint_heavypistol'] =    {label = 'Heavy Pistol Blueprint',    weight = 5, stack = true, close = false, description = "A blueprint?",       image = "weapon_blueprint_heavypistol.png"},
['weapon_blueprint_microsmg'] =       {label = 'Micro SMG Blueprint',       weight = 5, stack = true, close = false, description = "A blueprint?",       image = "weapon_blueprint_microsmg.png"},
['weapon_blueprint_minismg'] =        {label = 'Mini SMG Blueprint',        weight = 5, stack = true, close = false, description = "A blueprint?",       image = "weapon_blueprint_minismg.png"},
['weapon_blueprint_sawnoffshotgun'] = {label = 'Sawnoff Shotgun Blueprint', weight = 5, stack = true, close = false, description = "A blueprint?",       image = "weapon_blueprint_sawnoffshotgun.png"},
['weapon_blueprint_assaultrifle'] =   {label = 'Assault Rifle Blueprint',   weight = 5, stack = true, close = false, description = "A blueprint?",       image = "weapon_blueprint_assaultrifle.png"},
['pistol_frame'] =                    {label = 'Pistol Frame',              weight = 5, stack = true, close = false, description = "A frame?",           image = "pistol_frame.png"},
['snspistol_frame'] =                 {label = 'SNS Pistol Frame',          weight = 5, stack = true, close = false, description = "A frame?",           image = "snspistol_frame.png"},
['vintagepistol_frame'] =             {label = 'Vintage Pistol Frame',      weight = 5, stack = true, close = false, description = "A frame?",           image = "vintagepistol_frame.png"},
['appistol_frame'] =                  {label = 'AP Pistol Frame',           weight = 5, stack = true, close = false, description = "A frame?",           image = "appistol_frame.png"},
['pistol50_frame'] =                  {label = 'Pistol 50 Frame',           weight = 5, stack = true, close = false, description = "A frame?",           image = "pistol50_frame.png"},
['heavypistol_frame'] =               {label = 'Heavy Pistol Frame',        weight = 5, stack = true, close = false, description = "A frame?",           image = "heavypistol_frame.png"},
['microsmg_frame'] =                  {label = 'Micro SMG Frame',           weight = 5, stack = true, close = false, description = "A frame?",           image = "microsmg_frame.png"},
['minismg_frame'] =                   {label = 'Mini SMG Frame',            weight = 5, stack = true, close = false, description = "A frame?",           image = "minismg_frame.png"},
['sawnoffshotgun_frame'] =            {label = 'Sawnoff Shotgun Frame',     weight = 5, stack = true, close = false, description = "A frame?",           image = "sawnoffshotgun_frame.png"},
['assaultrifle_frame'] =              {label = 'Assault Rifle Frame',       weight = 5, stack = true, close = false, description = "A frame?",           image = "assaultrifle_frame.png"},
['brass'] =                           {label = 'Brass',                     weight = 5, stack = true, close = false, description = "Crafting Material",  image = "brass.png"},
['gunpowder'] =                       {label = 'Gunpowder',                 weight = 5, stack = true, close = false, description = "Powder?",            image = "gunpowder.png"},
['pistol'] =                          {label = 'Pistol Model',              weight = 5, stack = true, close = false, description = "Nice Model?",        image = "pistol.png"},
['snspistol'] =                       {label = 'SNS Pistol Model',          weight = 5, stack = true, close = false, description = "Nice Model?",        image = "snspistol.png"},
['vintagepistol'] =                   {label = 'Vintage Pistol Model',      weight = 5, stack = true, close = false, description = "Nice Model?",        image = "vintagepistol.png"},
['appistol'] =                        {label = 'AP Pistol Model',           weight = 5, stack = true, close = false, description = "Nice Model?",        image = "appistol.png"},
['pistol50'] =                        {label = 'Pistol 50 Model',           weight = 5, stack = true, close = false, description = "Nice Model?",        image = "pistol50.png"},
['heavypistol'] =                     {label = 'Heavy Pistol Model',        weight = 5, stack = true, close = false, description = "Nice Model?",        image = "heavypistol.png"},
['microsmg'] =                        {label = 'Micro SMG Model',           weight = 5, stack = true, close = false, description = "Nice Model?",        image = "microsmg.png"},
['minismg'] =                         {label = 'Mini SMG Model',            weight = 5, stack = true, close = false, description = "Nice Model?",        image = "minismg.png"},
['sawnoffshotgun'] =                  {label = 'Sawnoff Shotgun Model',     weight = 5, stack = true, close = false, description = "Nice Model?",        image = "sawnoffshotgun.png"},
['assaultrifle'] =                    {label = 'Assault Rifle Model',       weight = 5, stack = true, close = false, description = "Nice Model?",        image = "assaultrifle.png"},
```

{% endhint %}
{% endtab %}
{% endtabs %}

> **5) JOB ADDING**

{% tabs %}
{% tab title="QBCore" %}
{% hint style="info" %}

```lua
['weaponmaker'] = {
    label = 'Weapon Maker',
    defaultDuty = true,
    offDutyPay = false,
    grades = {
        ['0'] = {
            name = 'Maker',
            payment = 0
        },
    },
},
```

{% endhint %}
{% endtab %}

{% tab title="ESX" %}
{% hint style="info" %}

```sql
INSERT INTO `jobs` (name, label) VALUES
('weaponmaker', 'Weapon Maker');

INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
('weaponmaker', 0, 'maker', 'Maker', 0, '{}', '{}');
```

{% endhint %}
{% endtab %}
{% endtabs %}
