> For the complete documentation index, see [llms.txt](https://docs.apx-studios.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apx-studios.com/docs/resources/criminal-activies/apex-heroin-run/installation.md).

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

{% endhint %}

> **3) ASSET ADDING**

{% hint style="info" %}

1. Open apex\_heroinrun > 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_heroin'] 	= {['name'] = 'recipe_heroin', 	    ['label'] = 'Heroin Recipe', 	['weight'] = 30, 	['type'] = 'item',  ['image'] = 'recipe_heroin.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'}, 
['cement_powder'] 	= {['name'] = 'cement_powder', 	    ['label'] = 'Cement Powder', 	['weight'] = 30, 	['type'] = 'item',  ['image'] = 'cement_powder.png', 	['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Construction Material'}, 
['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?'}, 
['heroin'] 		= {['name'] = 'heroin', 	    ['label'] = 'Heroin Brick', 	['weight'] = 30, 	['type'] = 'item',  ['image'] = 'heroin.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Brown Substrance'}, 
['heroin_baggy'] 	= {['name'] = 'heroin_baggy', 	    ['label'] = 'Heroin Baggy', 	['weight'] = 30, 	['type'] = 'item',  ['image'] = 'heroin_baggy.png',     ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Brown Substrance in Small bags?'}, 
```

{% endhint %}

{% hint style="info" %}

```sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('recipe_heroin', 'Heroin Recipe', 10, 0, 1),
('hydrochloricacid', 'Hydrochloric Acid', 10, 0, 1),
('cement_powder', 'Cement Powder', 10, 0, 1),
('drugscale', 'Scale', 10, 0, 1),
('drugkit', 'Drug Kit', 10, 0, 1),
('zipbags', 'Zipbags', 10, 0, 1),
('heroin', 'Heroin Brick', 10, 0, 1),
('heroin_baggy', 'Heroin Baggy', 10, 0, 1);
```

{% endhint %}
