> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_drugs/installation.md).

# Installation

Follow these steps to install `rcore_drugs` for the first time.

## 📋 Prerequisites

Before installing, make sure your server has:

| Requirement              | Notes                                              |
| ------------------------ | -------------------------------------------------- |
| Artifact `4960` or newer | Older artifacts can break the resource.            |
| `rcore_drugs_assets`     | Must be started before `rcore_drugs`.              |
| OneSync                  | Required for lab instances and synced entities.    |
| Database resource        | `oxmysql`, `mysql-async`, or `ghmattimysql`.       |
| Framework                | ESX, QBCore, QBX, or Standalone.                   |
| Inventory                | Needed for items, stash, rewards, and consumables. |

{% hint style="danger" %}
Do not start `rcore_drugs` without `rcore_drugs_assets`. The script depends on the assets resource.
{% endhint %}

## 🛠️ First Time Installation

{% stepper %}
{% step %}

### Download the resource

Download `rcore_drugs_assets` and `rcore_drugs` from [CFX Portal](https://portal.cfx.re/assets/).
{% endstep %}

{% step %}

### Move the folders

Move both folders into your server 📁`resources` folder.

```
📁 server
└── 📁 resources
    ├── 📁 rcore_drugs_assets
    ├── 📁 rcore_drugs
    └── 📁 other resources
```

{% endstep %}

{% step %}

### Add inventory items

Add the drug items to your inventory resource. The item images are inside:

```
rcore_drugs/assets/inventory_images
```

See the [inventory integration](/paid-resources/rcore_drugs/integrations/inventory.md) page for supported inventories and item names.
{% endstep %}

{% step %}

### Ensure the resources

Add the resources to `server.cfg` after your framework, database, inventory, target, and dispatch resources.

```cfg
ensure rcore_drugs_assets
ensure rcore_drugs
```

{% endstep %}

{% step %}

### Seed default data

Start the server once. The script creates its database tables automatically.

After the tables are created, run this in the server console:

```cfg
drugs_seed
```

This imports the default labs, station presets, actions, consumables, harvest zones, dealers, supplier items, and upgrade data.
{% endstep %}

{% step %}

### Configure the script

Join the server and open:

```cfg
/drugs_admin
```

Use the admin panel to configure the script for your server.
{% endstep %}
{% endstepper %}

## 🗄️ Database

`rcore_drugs` creates its own database tables automatically on startup. You do not need to import an SQL file manually.

The default gameplay data is not inserted until you run `drugs_seed` from the server console.
