Welcome to our RxDrugsLabs installation page. Here you can find the dependencies you need, instructions on how to start RxDrugsLabs, how to add shells/mlo's, and Frequently Asked Questions(FAQ).
If you still can't install the script or encounter any errors, don't hesitate to create a ticket in our discord.
Items
We have put some items in the configs to make it work by default with 3 pre-configured drugs: coke, weed & meth. You can change these items, or create those in your server.
Make sure to at least create these items OR replace them in your config with existing items in your server
Install dependencies
Make sure you have installed all the dependencies. Without these scripts the RxDrugsLabs script will not work properly.
Make sure you download fmLib .zip. If you are not sure which one you downloaded, you can look in the web folder if there is an build folder. If not, you downloaded the wrong version.
Dependencies
Links
Optional dependencies
Ensuring scripts
To make sure RxDrugsLabs works properly we need to make sure all scripts start in the right order in your server.cfg. Below you can find an example of how it can look like:
Your shells also need to start before the drugslab script to make sure everything works properly.
You can also create a folder called [rx] in your resource folder. If you have multiple scripts from us, you don't need to add them all to your server.cfg one by one. :)
-- First, we need to start "oxmysql"ensure oxmysql-- After oxmysql, start your frameworkensure es_extended or qb-core-- start ox_libensure ox_lib-- if you use ox_target or qb-targetensure ox_target or qb-target-- start you inventoryensure your_inventory-- start fmLibensure fmLib-- start your shellsensure your_shells-- And now we can start the drugslabensure RxDrugsLabs or [rx]
Optional ensuring
If you bought the DLC, make sure it starts before RxDrugsLabs. Otherwise the script won't work. Below you will find the correct order of starting the scripts. This only applies to our scripts, make sure the rest also starts correctly as described above.
You can find more information about the DLC and how to configure it here
-- start fmLibensure fmLib-- start your shellsensure your_shells-- start RxD_Operationensure RxD_Operation-- And now we can start the drugslabensure RxDrugsLabs or [rx]
Database
To ensure that a drugslab you have created is saved, you need to make sure the .sql file is imported into your database. If you restart your server without doing this, the drugslab will not be saved, and you will lose it.
Shells/mlo's
The Drug Lab script supports shells, MLOs, and IPLs, but there is a difference in their configuration: for a shell, you need to use offset coords, and for an MLO/IPL, you use normal coords. Below, you can see the two different configuration examples.
If you want to add a new shell or MLO as a drug lab, you can simply copy an existing one. Then, you only need to change the name of the shell/MLO and the coords. As explained below, make sure to use the correct type: offset coords for a shell and normal coords for an MLO.
For a shell, use offset = vector3(x, y, z), and for a map, use coords = vector3(x, y, z).
Shell
--[[ BY RX Scripts Š rxscripts.xyz FILE NAME DOES NOT MATTER YOU CAN CREATE THESE DRUGLABS IN-GAME BY USING /dl:create INGAME type = 'map', works with coordinates (for MLO, YMAP, IPL's) type = 'shell', works with offsets, spawn shells by /shell:spawn shell_name, to get the offsets--]]Config.DrugLabs['rxs_weedlab'] = { type ='shell', -- map or shell shell ='rxs_weedlab', door = { offset =vector3(-16.391327, 6.398926, 1.000198), -- offset instead of coords heading =266.34463500977 }, laptop = { offset =vector3(-13.431366, 8.115967, 1.812569), -- offset instead of coords heading =4.95872497559, }, stash = { offset =vector3(-15.917267, -2.097412, 1.000191), -- offset instead of coords }, buyRequires = { enabled =false, -- if enabling, make sure to add gangs, otherwise no one can buy the lab gangs = { -- required gang(s) & minimum grade to buy the lab ['ballas'] =0, ['vagos'] =0, } }, actions = { ['Cut Weed'] = { offset =vector3(-4.223541, 7.229004, 1.000244), -- offset instead of coords progressLabel ='Cut Weed..', duration =10000, -- in ms animation = { dict ="mini@repair", anim ="fixing_a_player", }, requiredItems = { { item ='weed_leaf', label ='Weed Leaf', amount =20, remove =true, } }, rewardItems = { { item ='weed', label ='Weed', amount =5 } }, }, ['Bag Weed'] = { offset =vector3(5.104233, 7.195801, 1.000244), -- offset instead of coords progressLabel ='Bagging Weed..', duration =10000, -- in ms animation = { dict ="mini@repair", anim ="fixing_a_player", }, requiredItems = { { item ='weed', label ='Weed', amount =20, remove =true } }, rewardItems = { { item ='weed_baggy', label ='Weed Bag', amount =1 } }, }, }, workers = { -- Workers can be hired to do actions for you, they will work slower as they work 24/7. (They are tired, duhh..)
['Walter White'] = { label ='Walter White', model ='s_m_y_factory_01', offset =vector3(-6.764313, 7.241211, 1.000244), -- offset instead of coords heading =359.57705688477, action = 'Cut Weed', -- must match a valid action, the worker will do this action and needs the required items and gives the reward items of the action
duration =1, -- in minutes, how long will the worker take to complete the action one time onlineRequired =false, -- if true, the worker will only work when the lab owner is online hire = { price =5000, -- per hour minHours =24, -- min hours the worker must be hired at once, must be re-hired after this time maxHours =72, -- max hours the worker can be hired at once, must be re-hired after this time } }, ['Jesse Pinkman'] = { label ='Jesse Pinkman', model ='s_m_y_factory_01', offset =vector3(7.319870, 7.190918, 1.000244), -- offset instead of coords heading =1.6199799776077, action = 'Bag Weed', -- must match a valid action, the worker will do this action and needs the required items and gives the reward items of the action
duration =1, -- in minutes, how long will the worker take to complete the action one time onlineRequired =false, -- if true, the worker will only work when the lab owner is online hire = { price =5000, -- per hour minHours =24, -- min hours the worker must be hired at once, must be re-hired after this time maxHours =72, -- max hours the worker can be hired at once, must be re-hired after this time } }, },}
MLO
--[[ BY RX Scripts Š rxscripts.xyz FILE NAME DOES NOT MATTER YOU CAN CREATE THESE DRUGLABS IN-GAME BY USING /dl:create INGAME type = 'map', works with coordinates (for MLO, YMAP, IPL's) type = 'shell', works with offsets, spawn shells by /shell:spawn shell_name, to get the offsets--]]Config.DrugLabs['weed_ipl'] = { type ='map', -- map or shell door = { coords =vector3(1065.9797, -3183.3423, -39.1635), -- coords instead of offset heading =88.8834, }, laptop = { coords =vector3(1035.8090, -3202.6897, -37.2837), -- coords instead of offset heading =4.0, }, stash = { coords =vector3(1043.0303, -3194.2317, -38.1616), -- coords instead of offset }, buyRequires = { enabled =false, -- if enabling, make sure to add gangs, otherwise no one can buy the lab gangs = { -- required gang(s) & minimum grade to buy the lab ['ballas'] =0, ['vagos'] =0, } }, actions = { ['Cut Weed'] = { coords =vector3(1038.5905, -3205.9399, -37.2837), -- coords instead of offset progressLabel ='Cut Weed..', duration =10000, -- in ms animation = { dict ="mini@repair", anim ="fixing_a_player", }, requiredItems = { { item ='weed_leaf', label ='Weed Leaf', amount =20, remove =true, } }, rewardItems = { { item ='weed', label ='Weed', amount =5 } }, }, ['Bag Weed'] = { coords =vector3(1033.7700, -3205.9792, -37.2838), -- coords instead of offset progressLabel ='Bagging Weed..', duration =10000, -- in ms animation = { dict ="mini@repair", anim ="fixing_a_player", }, requiredItems = { { item ='weed', label ='Weed', amount =20, remove =true } }, rewardItems = { { item ='weed_baggy', label ='Weed Bag', amount =1 } }, }, }, workers = { -- Workers can be hired to do actions for you, they will work slower as they work 24/7. (They are tired, duhh..)
['Walter White'] = { label ='Walter White', model ='s_m_y_factory_01', coords =vector3(1051.1005, -3204.2292, -39.1315), -- coords instead of offset heading =195.6177, action = 'Cut Weed', -- must match a valid action, the worker will do this action and needs the required items and gives the reward items of the action
duration =1, -- in minutes, how long will the worker take to complete the action one time onlineRequired =false, -- if true, the worker will only work when the lab owner is online hire = { price =5000, -- per hour minHours =24, -- min hours the worker must be hired at once, must be re-hired after this time maxHours =72, -- max hours the worker can be hired at once, must be re-hired after this time } }, ['Jesse Pinkman'] = { label ='Jesse Pinkman', model ='s_m_y_factory_01', coords =vector3(1033.9453, -3203.7629, -38.1788), -- coords instead of offset heading =26.9835, action = 'Bag Weed', -- must match a valid action, the worker will do this action and needs the required items and gives the reward items of the action
duration =1, -- in minutes, how long will the worker take to complete the action one time onlineRequired =false, -- if true, the worker will only work when the lab owner is online hire = { price =5000, -- per hour minHours =24, -- min hours the worker must be hired at once, must be re-hired after this time maxHours =72, -- max hours the worker can be hired at once, must be re-hired after this time } }, },}