🪴hd-drugmaking

Compatibility

Frameworks Supports QBCore & ESX Can also be setup as Standalone to use any other framework Inventories Currently supports qb-inventory, ox_inventory, origen_inventory and qs_inventory If your inventory is not supported, just make a ticket in my discord and I'll add support for it

Installation

  1. Download the asset from your keymaster https://keymaster.fivem.net/

  2. Drag en drop the script into your resources folder

  3. Make sure you have the following structure in you server.cfg:

ensure ox_lib
ensure hd-drugmaking-props
ensure hd-drugmaking
  1. Download the images and put them in your inventory images folder

365KB
archive
Open
  1. Run the SQL

SQL
CREATE TABLE IF NOT EXISTS `drugmaking_plants` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `owner` varchar(80) NOT NULL,
  `coords` longtext NOT NULL,
  `stage` int(11) NOT NULL DEFAULT 0,
  `type` varchar(50) NOT NULL DEFAULT '0',
  `soil` double NOT NULL DEFAULT 0,
  `seed` double NOT NULL DEFAULT 0,
  `water` double NOT NULL DEFAULT 0,
  `fertilizer` double NOT NULL DEFAULT 0,
  `bucket` int(11) NOT NULL DEFAULT 0,
  `rack_coords` longtext NOT NULL DEFAULT '{}',
  `light_coords` longtext NOT NULL DEFAULT '{}',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE IF NOT EXISTS `drugmaking_stations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `owner` varchar(80) NOT NULL,
  `coords` varchar(255) DEFAULT NULL,
  `bucket` int(11) DEFAULT NULL,
  `type` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
  1. Copy and paste all the items into. If you´re using ox_inventory, choose the Ox inventory items If you´re using qb-inventory, choose the QB items

Ox inventory items

QB items
ESX items
QS items

Config

Config.lua

How can I add new drugs?

It is possible to add new drugs, however, due to the complex object handling for each drug, you can only use the premade templates when creating new ones. Weed and cocaine follow a similar structure. The available templates under Config.Drugs is "weed" and "cocaine". Below, I’ll explain the process of creating new drugs in more detail.

IMPORTANT The ['example-drug'] and [1] = 'your-seed-item' must be unique and cannot share names with any other drug. This is because, when planting, the script checks which seed item was used and refers back to the corresponding ['example-drug'], which then handles all related processes.

For Developers

Bucketing

Use the following event when you switch buckets for players in your housing/apartment. The event should be triggered from the client. Replace bucket with the new bucket

This event is not needed anymore since update 1.3.0, bucket changes is now being handled automatically by the script.

The following event checks for deleted objects and incorrect positions. It can be called from for example your housing script when a players enters an interior. This loads deleted objects and fix incorrect positions.

Below are all the editable functions

Client Functions
Server Functions

Last updated