STANDALONE IT Drugs [QB/ESX]

SaifNeon

SaifNeon

Administrative
Joined
Apr 25, 2022
Messages
736
Reaction score
591
Points
93
Credits
34,213
IT Drugs [QB/ESX]
Please, Log in or Register to view quote content!

Supported Frameworks​

Suported Inventorys​

✅ | Supported 🔧 | Pending ❌ | Not Supported

Dependencys​

Please, Log in or Register to view URLs content!

🌱 | Planting

Our script offers a unique planting system that allows players to grow unlimited plants (or a set max amount in the config). With the ability to plant seeds, players can cultivate their own plants and harvest them for raw materials. Our planting system makes the complete map a potential farm, allowing players to grow plants in any location they choose (Soil/Ground check can be enabled in the config). Optional growth speed zones add a strategic layer to farming, making it a fun and engaging experience.

🧪 | Processing Tables

Our script features processing tables that allow players to transform raw materials into high-value drugs. Players can use these tables to create drugs themselves, adding a layer of complexity to the drug economy. The Tables can be placed anywhere on the map, making it easy for players to process their materials and create drugs. Every table can be configured in the config file, allowing server admins to customize the experience to fit their unique needs.

💰 | Selling Drugs to NPCs

Our script allows players to sell drugs to NPCs, creating a dynamic market environment. Players can sell their drugs to NPCs for a profit, enhancing the overall gameplay. This feature adds a layer of realism to the drug economy, making it a fun and engaging experience for players. The selling prices on selling zones can be configured in the config file.

🚬 | Takeable Drugs

Our script offers takeable drugs that players can consume for various effects. Players can take drugs to enhance their gameplay experience, adding a layer of realism to the drug economy. The effects of the drugs can be configured in the config file.

📊 | Ingame Admin Menu

Our script features an ingame admin menu that allows server admins to manage drugs and tables. Admins can use the menu view and manage all drugs and tables on the server, making it easy to keep track of everything. The admin menu can be accessed by typing /drugadmin [plants/tables] in the chat.

🔧 | Fully Configurable

Our script is fully configurable, allowing server admins to customize every aspect to fit their unique needs. From growth speed zones to selling prices, every aspect of the script can be configured in the config file.

Please, Log in or Register to view quote content!

Asset dependencies​


DependenciesLinks
ox_lib
Please, Log in or Register to view URLs content!
oxmysql
Please, Log in or Register to view URLs content!
TARGET SYSTEM
ESX (ox_target)
Please, Log in or Register to view URLs content!
QbCore (qb-target)
Please, Log in or Register to view URLs content!

Asset positioning
For the execution of this asset, we will respect the respective order mentioned below.

Copy-- First we will start the Database
ensure oxmysql

-- Then we will start the cores, never below
ensure es_extended or qb-core

-- Your inventory system, always on top
ensure [inventory]

Then we start all the dependencies
ensure [dependencies]

-- Run it-drugs here along with its dependencies
ensure [it-drugs]

Database:
Our drug script includes two databases, befor the first start of the script you should check if the tables allready exists in your Database and delete them if they exists. If you just update the script you dont have to do this.


-- Check for the drug_plants table
DROP TABLE IF EXISTS `drug_plants`;
-- Check for the drug
DROP TABLE IF EXISTS `drug_processing`;



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

Copy-- 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,
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
);

-- Install the drug_processing table
CREATE TABLE IF NOT EXISTS drug_processing (
id VARCHAR(11) NOT NULL, PRIMARY KEY(id),
coords LONGTEXT NOT NULL,
rotation DOUBLE NOT NULL,
owner LONGTEXT NOT NULL,
type VARCHAR(100) NOT NULL
);

Items for it-drugs use​


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!
Items for esx_inventoryItems for qb-inventory Items for ox_inventory

ESX Inventory:
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),
('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)
;



QB Invetory:

watering_can = {
name = "watering_can",
label = 'Watering can',
weight = 500,
type = 'item',
image = "watering_can.png",
unique = false,
useable = false,
shouldClose = false,
combinable = nil,
description = 'simple watering can'
},

fertilizer = {
name = 'fertilizer',
label = 'fertilizer',
weight = 500,
type = 'item',
image = 'fertilizer.png',
unique = false,
useable = false,
shouldClose = false,
combinable = nil,
description = 'fertilizer'
},

advanced_fertilizer = {
name = 'advanced_fertilizer',
label = 'Advanced Fertilizer',
weight = 500,
type = 'item',
image = 'advanced_fertilizer.png',
unique = false,
useable = false,
shouldClose = false,
combinable = nil,
description = 'Fertilizer with the litte extra'
},

liquid_fertilizer = {
name = "liquid_fertilizer",
label = 'Liquid Fertilizer',
weight = 200,
type = 'item',
image = "liquid_fertilizer.png",
unique = false,
useable = false,
shouldClose = false,
combinable = nil,
description = 'Basicly Water with nutrations'
},

weed_lemonhaze_seed = {
name = 'weed_lemonhaze_seed',
label = 'Weed Lemonhaze Seed',
weight = 20,
type = 'item',
image = 'weed_lemonhaze_seed.png',
unique = false,
useable = true,
shouldClose = true,
combinable = nil,
description = 'Weed Lemonhaze Seed'
},

weed_lemonhaze = {
name = 'weed_lemonhaze',
label = 'weed lemonhaze',
weight = 20,
type = 'item',
image = 'weed_lemonhaze.png',
unique = false,
useable = false,
shouldClose = false,
combinable = nil,
description = 'Weed Lemonhaze'
},

coca_seed = {
name = 'coca_seed',
label = 'coca seed',
weight = 20,
type = 'item',
image = 'coca_seed.png',
unique = false,
useable = true,
shouldClose = true,
combinable = nil,
description = 'Coca Seed'
},

coca = {
name = 'coca',
label = 'coca',
weight = 20,
type = 'item',
image = 'coca.png',
unique = false,
useable = false,
shouldClose = true,
combinable = nil,
description = 'Coca'
},

paper = {
name = 'paper',
label = 'paper',
weight = 50,
type = 'item',
image = 'paper.png',
unique = false,
useable = false,
shouldClose = false,
combinable = nil,
description = 'Paper'
},

nitrous = {
name = 'nitrous',
label = 'nitrous',
weight = 500,
type = 'item',
image = 'nitrous.png',
unique = false,
useable = false,
shouldClose = false,
combinable = nil,
description = 'nitrous'
},

cocaine = {
name = 'cocaine',
label = 'cocaine',
weight = 20,
type = 'item',
image = 'cocaine.png',
unique = false,
useable = true,
shouldClose = false,
combinable = nil,
description = 'Small bag of cocaine'
},

joint = {
name = 'joint',
label = 'joint',
weight = 10,
type = 'item',
image = 'joint.png',
unique = false,
useable = true,
shouldClose = true,
combinable = nil,
description = 'joint'
},

weed_processing_table = {
name = 'weed_processing_table',
label = 'Weed processing table',
weight = 1000,
type = 'item',
image = 'weed_processing_table.png',
unique = false,
useable = true,
shouldClose = true,
combinable = nil,
description = 'Process some weed'
},

cocaine_processing_table = {
name = 'cocaine_processing_table',
label = 'cocaine processing table',
weight = 1000,
type = 'item',
image = 'cocaine_processing_table.png',
unique = false,
useable = true,
shouldClose = true,
combinable = nil,
description = 'Process some cocaine'
},



OX Inventory:
["watering_can"] = {
label = "Watering can",
weight = 500,
stack = false,
close = false,
description = "Simple watering can",
client = {
image = "watering_can.png",
}
},

["fertilizer"] = {
label = "Fertilizer",
weight = 500,
stack = false,
close = false,
description = "Fertilizer",
client = {
image = "fertilizer.png",
}
},

["advanced_fertilizer"] = {
label = "Advanced fertilizer",
weight = 500,
stack = false,
close = false,
description = "Fertilizer with the litte extra",
client = {
image = "advanced_fertilizer.png",
}
},

["liquid_fertilizer"] = {
label = "Liquid Fertilizer",
weight = 200,
stack = false,
close = false,
description = "Basicly Water with nutrations",
client = {
image = "liquid_fertilizer.png",
}
},

["weed_lemonhaze_seed"] = {
label = "Weed Lemonhaze Seed",
weight = 20,
stack = true,
close = true,
description = "Weed Lemonhaze Seed",
client = {
image = "weed_lemonhaze_seed.png",
}
},

["weed_lemonhaze"] = {
label = "Weed Lemonhaze",
weight = 20,
stack = true,
close = false,
description = "Weed Lemonhaze",
client = {
image = "weed_lemonhaze.png",
}
},

["coca_seed"] = {
label = "Coca Seed",
weight = 20,
stack = true,
close = true,
description = "Coca Seed",
client = {
image = "coca_seed.png",
}
},

["coca"] = {
label = "Coca",
weight = 20,
stack = true,
close = false,
description = "Coca",
client = {
image = "coca.png",
}
},

["paper"] = {
label = "Paper",
weight = 50,
stack = true,
close = false,
description = "Paper",
client = {
image = "paper.png",
}
},

["nitrous"] = {
label = "Nitrous",
weight = 500,
stack = false,
close = false,
description = "Nitrous",
client = {
image = "nitrous.png",
}
},

["cocaine"] = {
label = "Cocaine",
weight = 20,
stack = true,
close = true,
description = "Small bag of cocaine",
client = {
image = "cocaine.png",
}
},

["joint"] = {
label = "Joint",
weight = 10,
stack = true,
close = true,
description = "Joint",
client = {
image = "joint.png",
}
},

["weed_processing_table"] = {
label = "Weed Processing Table",
weight = 1000,
stack = false,
close = true,
description = "Process some weed",
client = {
image = "weed_processing_table.png",
}
},

["cocaine_processing_table"] = {
label = "Cocaine Processing Table",
weight = 1000,
stack = false,
close = true,
description = "Process some cocaine",
client = {
image = "cocaine_processing_table.png",
}
}






Use Webhooks​

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


Discord Webhooooks

With version 1.3.0 of it-drugs the creation of webhooks is changing. From now on the webhooks are set entirely in the file server/sv_webhooks.

Copylocal webhookSettings = {
['active'] = false, -- Set to true to enable the webhook
['name'] = 'it-drugs', -- Name for the webhook
['avatar'] = ' ', -- Avatar for the webhook
['urls'] = {
['plant'] = nil, --'', -- Webhook URL for plant actions
['table'] = nil, --'', -- Webhook URL for table actions
['sell'] = nil, --'', -- Webhook URL for sell actions
['message'] = nil, --'', -- Webhook URL for messages
}
}
It is now possible to use your own webhook links for the various individual actions of the user.
If a valid webhook id is entered and the attribute active is set to true, a webhook message is sent for the corresponding category.

Copylocal webhookSettings = {
['active'] = false, -- Set to true to enable the webhook
['name'] = 'it-drugs', -- Name for the webhook
['avatar'] = ' ', -- Avatar for the webhook
['urls'] = {
['plant'] = '
Please, Log in or Register to view URLs content!
', -- Webhook URL for plant actions
['table'] = nil, --'', -- Webhook URL for table actions
['sell'] = nil, --'', -- Webhook URL for sell actions
['message'] = nil, --'', -- Webhook URL for messages
}
}
In this example now the script only sends webhook messages when a user interacts with a plant.

Basic asset configuration​


We do not recommend editing frameworks unnecessarily, since almost all assets depend exclusively on your framework and exports on the name of your framework. Otherwise and if you edited your framework, read these steps carefully.
Basic Framework Configuration
Please expand each part to see information about the configuration of the asset, this way you will understand the general operation of the asset on the framework and editable files side.

Advanced Framework Configuration:
If your framework is completely modified, both in events and name, you should access the bridge folder to adapt the native events of your framework to the codes you have created. If this step doesn't work, we ask that you ask your framework modifier or trusted developer for help.

Edit the Script:
Fell free to edit the complete. If you made some changes and think others can use them, feel free to open a pull request on GitHub, and we maybe adapt your changes to the script.

The asset will work automatically if your framework is called es_extended or qb-core, it will automatically detect if any of them are started.

Adjustments:
Please, Log in or Register to view URLs content!


Download
Please, Log in or Register to view URLs content!
 
4,656Threads
10,845Messages
40,546Members
Lightning200Latest member
Top