# 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  | [Mr Brown](https://www.gta5-mods.com/maps/mlo-4x-drug-lab-interiors-sp-fivem) - Druglabs |

### 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_methrun
```

{% endhint %}

> **3) ASSET ADDING**

{% hint style="info" %}

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

> **4) ITEM ADDING (QBCORE & ESX)**
>
> The first block shows the data, you'll have to put into shared/items.lua in **qbcore**
>
> The second block shows the data, you'll have to put into the database in **esx**

{% hint style="info" %}

```lua
['recipe_meth'] 	= {['name'] = 'recipe_meth',         ['label'] = 'Meth Recipe', 	 ['weight'] = 30, 	['type'] = 'item',  ['image'] = 'recipe_meth.png', 	['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Recipe for something?'}, 
['hydrochloricacid']    = {['name'] = 'hydrochloricacid',    ['label'] = 'Hydrochloric Acid',    ['weight'] = 30, 	['type'] = 'item',  ['image'] = 'hydrochloricacid.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Hydrochloric Acid'}, 
['methylamine'] 	= {['name'] = 'methylamine', 	     ['label'] = 'Methylamine', 	 ['weight'] = 30, 	['type'] = 'item',  ['image'] = 'methylamine.png', 	['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Methylamine'}, 
['drugscale'] 		= {['name'] = 'drugscale', 	     ['label'] = 'Scale', 	         ['weight'] = 30, 	['type'] = 'item',  ['image'] = 'drugscale.png', 	['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A special Scale'}, 
['drugkit'] 		= {['name'] = 'drugkit', 	     ['label'] = 'Drug Kit', 	         ['weight'] = 30, 	['type'] = 'item',  ['image'] = 'drugkit.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'A kit?'}, 
['zipbags'] 		= {['name'] = 'zipbags', 	     ['label'] = 'Zipbags', 	         ['weight'] = 30, 	['type'] = 'item',  ['image'] = 'zipbags.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Small bags?'}, 
['meth'] 		= {['name'] = 'meth', 		     ['label'] = 'Meth Brick', 	         ['weight'] = 30, 	['type'] = 'item',  ['image'] = 'meth.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Blue Substrance'}, 
['meth_baggy'] 		= {['name'] = 'meth_baggy',          ['label'] = 'Meth Baggy', 	         ['weight'] = 30, 	['type'] = 'item',  ['image'] = 'meth_baggy.png',       ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Blue Substrance in Small bags?'}, 
```

{% endhint %}

{% hint style="info" %}

```sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('recipe_meth', 'Meth Recipe', 10, 0, 1),
('hydrochloricacid', 'Hydrochloric Acid', 10, 0, 1),
('methylamine', 'Methylamine', 10, 0, 1),
('drugscale', 'Scale', 10, 0, 1),
('drugkit', 'Drug Kit', 10, 0, 1),
('zipbags', 'Zipbags', 10, 0, 1),
('meth', 'Meth Brick', 10, 0, 1),
('meth_baggy', 'Meth Baggy', 10, 0, 1);
```

{% endhint %}
