📥・Installation

Installation

Welcome to the it-drugs installation guide, here you can learn how to completely install our asset, following each step we will achieve a clean and fluid installation where you will not find any problems, as long as the documentation has been completed in full.

If you do not have programming experience, we recommend that you read each step completely without skipping any lines, since all documentation is important and should not be ignored under any circumstances. If you have a trusted developer, you can install this quickly, easily and safely if you complete this documentation step by step.

If at the end of this documentation you still have any problems, review each step again, after having checked that everything is correct, you can obtain more information about common errors in the Common Problems section within this same documentation to seek help independently.

When installing the script make sure to not rename the script folder, this can cause errors in the script. The name of the script folder should always be it-drugs.

Need help? Watch the Video!

Script Download

Before starting, you must open the scripts GitHub page to download the asset.
Just as you download it the first time, you will also download it multiple times in the future to get updates.

Downloading Dependencies

The dependencies for this asset are mandatory, so please follow the dependency guide completely and use all required files.

Due to the fact that the official overextended team shut down, we now recommend using the CommunityOx fork of the ox scripts.

ox_lib

Lädt...

oxmysql

Lädt...

it_bridge

Lädt...
Lädt...

This script has dependencies depending on its framework, even if it says optional we recommend having them for correct use.

Optional for ESX, ND_Core, QBox

Lädt...

Optional for QbCore

Lädt...

You can also use ox_target on your QbCore Server but only if you are using ox_target with version 1.16.0 or older!

Server.cfg Positioning

For best results, start the dependencies before the it-drugs script. This script should always be started under your framework and inventory systems and the it_bridge script for seamless integration. For the best result add it_bridge and it-drugs at the end of your server.cfg file.

-- First we will start the Database
ensure oxmysql
 
ensure framework -- Your framework, always on top [This has to be an actual script name]
ensure inventory -- Your inventory system, [This has to be an actual script name]
 
ensure ox_lib -- The library for the script
ensure [other-dependencies] -- Other dependencies that you may have and need for it_bridge
 
ensure it_bridge -- The bridge for all it-scripts
ensure it-drugs

Database Installation

The Script will automaticly install and update the database but if you want you still can intall the database manually with this commands:

For this step, we highly recommend using HeidiSQL to avoid issues, as it provides an updated version of MariaDB. We have a guide that explains step-by-step how to use HeidiSQL. If you choose to use phpMyAdmin, we will not be responsible for any errors that may occur in your database.

Lädt...
  DROP TABLE IF EXISTS drug_plants;
  -- Install the drug_plants table
  CREATE TABLE IF NOT EXISTS drug_plants (
      id VARCHAR(11) NOT NULL, PRIMARY KEY(id),
      owner LONGTEXT DEFAULT NULL,
      coords LONGTEXT NOT NULL,
      dimension INT(11) DEFAULT 0,
      time INT(255) NOT NULL,
      type VARCHAR(100) NOT NULL,
      health DOUBLE NOT NULL DEFAULT 100,
      fertilizer DOUBLE NOT NULL DEFAULT 0,
      water DOUBLE NOT NULL DEFAULT 0,
      growtime INT(11) NOT NULL
  );
 
  DROP TABLE IF EXISTS drug_processing;
  -- Install the drug_processing table
  CREATE TABLE IF NOT EXISTS drug_processing (
      id VARCHAR(11) NOT NULL, PRIMARY KEY(id),
      coords LONGTEXT NOT NULL,
      dimension INT(11) DEFAULT 0,
      rotation DOUBLE NOT NULL,
      owner LONGTEXT NOT NULL,
      type VARCHAR(100) NOT NULL
  );

Items for it-drugs

This guid is only for the scripts default items, but you can add new items after the same shemata.

If you use qbcore + ox_inventory, you must add the items inside ox_inventory for the items using to work.

Here you will find a series of selected items in different extensions for different inventories, select the option that suits your server, remember to check if your inventory works with this script!

The images for these items can always be found in a folder named items/img within the previously downloaded script. Make sure to use these images to ensure consistency and a seamless experience for players on your server.

You have to add these item to your item database.

    INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
      ('watering_can', 'Watering Can', 500, 0, 1),
      ('fertilizer', 'fertilizer', 500, 0, 1),
      ('advanced_fertilizer', 'Advanced Fertilizer', 500, 0, 1),
      ('liquid_fertilizer', 'Liquid Fertilizer', 200, 0, 1),
      ('weed_lemonhaze_seed', 'Weed Lemonhaze Seed', 20, 0, 1),
      ('weed_lemonhaze', 'Weed Lemonhaze', 20, 0, 1),
      ('weed_og_seed', 'Weed OG Seed', 20, 0, 1),
      ('weed_og', 'weed Og', 20, 0, 1),
      ('weed_purple_haze_seed', 'Weed Purple Haze Seed', 20, 0, 1),
      ('weed_purple_haze', 'weed Purple Haze', 20, 0, 1),
      ('weed_white_widow_seed', 'Weed White Widow Seed', 20, 0, 1),
      ('weed_white_widow', 'weed White Widow', 20, 0, 1),
      ('weed_blueberry_seed', 'Weed Blueberry Seed', 20, 0, 1),
      ('weed_blueberry', 'weed Blueberry', 20, 0, 1),
      ('coca_seed', 'Coca Seed', 20, 0, 1),
      ('coca', 'Coca', 20, 0, 1),
      ('paper', 'Paper', 20, 0, 1),
      ('nitrous', 'nitrous', 20, 0, 1),
      ('cocaine', 'cocaine', 20, 0, 1),
      ('joint', 'joint', 20, 0, 1),
      ('weed_processing_table', 'weed_processing_table', 1000, 0, 1),
      ('cocaine_processing_table', 'cocaine_processing_table', 1000, 0, 1)
    ;

Use Webhooks

You want to log the different actions of the script on your discord server? Then take a look at this.

Lädt...