Requirements#
The server
| Framework | qbx_core (Qbox). ESX and plain QBCore are not supported. |
| Resources | ox_lib, oxmysql, ox_target, ox_inventory |
| Server | OneSync enabled. |
| Database | MariaDB or MySQL through oxmysql. The tables are created on first start. |
| Tested with | qbx_core 1.24.0, ox_inventory 2.48.0, ox_lib 3.40.0, ox_target 1.17.2 and oxmysql 2.14.2. |
Optional
Each of these is detected at run time. When one is missing, its feature is skipped or falls back to Config.Fallbacks.
| Resource | What it adds |
|---|---|
glitch-criminaltablet |
The Botanist and the Cartel as tablet contacts, contact trust, REP to meet the Cartel, crew batch caps and the tablet map. Without it every player gets Config.Fallbacks.trust (100) and anyone may meet the Cartel. |
glitch-xpSystem |
Growing, chemistry and dealing XP, the growing perks and the seed level gates in Config.SeedLevels. |
glitch-minigames |
The lab, grow lab and gummy minigames. Without it an ox_lib skill check runs instead. |
glitch-drugSales |
Street selling, and the sales total that also lets a player meet the Cartel. |
glitch-stores |
A shop screen for the Botanist and the weed shop. Without it the Botanist uses ox_lib menus and the weed shop opens the plain ox_inventory shop. |
glitch-buffs |
Drug tolerance, overdoses, fatigue and the greened-out debuff. |
glitch-admin |
Staff logs, live map plant pins and Discord staff roles for Config.Gummies.staffRoles. |
glitch-economy |
The crime ledger. |
glitch-pauseMenu |
Blip names in the pause menu map legend. |
glitch-poolcleaning |
Counts and checks the net events players send to this resource. |
glitch-uiElements |
The drawer style for the gummy screens (Config.Gummies.panel = 'drawer'). |
glitch-ambulancejob |
Joints and gummies dull injury pain. |
sd-phone |
Plot watch texts and grow lab rent and power mail. |
rc-interactions |
Dialogue with the contacts. |
ps-dispatch |
Police alerts. Without it on-duty police get a notification and a blip. |
bob74_ipl |
Loads the biker weed farm interior the grow labs use. |
cfx_gn_warehouses |
The G&N Studio warehouses MLO, location 6 with its coke lab entity set on. The default coke lab stations sit inside it. |
Installation steps#
Put the
glitch-drugsfolder in your resources folder. The folder name is case-sensitive.Add the entries from
install/ox_inventory_items.luatoox_inventory/data/items.lua, skipping any item you already have. Copy the pictures frominstall/imagestoox_inventory/web/images. They cover every item except six that most item packs already include (empty_weed_bag,rolling_paper,baking_soda,weed_brick,coke_brickandcrack_baggy), plus the 48 gummy pack pictures (thc_gummy_<shape>_<colour>.png).Make sure these common items exist too:
black_money,jerry_can(or theWEAPON_PETROLCANweapon),energy_drink, androlling_paperin a shop your players use.Optional starter shop: copy the
WeedShopentry frominstall/ox_inventory_shop.luatoox_inventory/data/shops.lua, or setConfig.WeedShop.enabled = false.The tables are created when the resource starts. If your database user cannot create tables, run
sql/install.sqlonce by hand and setConfig.ManualDatabaseSetup = true.Add to
server.cfg, after ox_lib, oxmysql, qbx_core, ox_inventory and ox_target, and after any optional resource you use:ensure glitch-drugs add_ace group.admin glitch-drugs.admin allow add_ace group.admin command.cokelab allowSet the positions for your map: the contacts (
Config.Contacts), the coke lab stations and field, the weed shop (Config.WeedShop.coords) and the grow lab doors (Config.Lab.sitesinshared/lab.lua). The lab stations and the field are easiest to place with/cokelabin the city. That saves them todata/lab.jsonanddata/field.json(both ship empty), and from then on those files win overConfig.Coke.stationsandConfig.CocaField.center. Delete a file to go back to the config.Restart the server.
[!NOTE] The default coke lab stations are inside the
cfx_gn_warehousesMLO. The console warns at start when the stations are still on the defaults and the MLO is not installed.
[!NOTE] The old
it-drugsACE still works whileConfig.LegacyAceis set. SetConfig.LegacyAce = falseon a new install.
Permissions#
| ACE | What it allows |
|---|---|
glitch-drugs.admin |
/drugadmin plants, /getGroundHash and the grow lab Admin tab. |
command.cokelab |
/cokelab (the command is also restricted to group.admin). |
Updating#
The resource runs next to it-drugs, because net events and callbacks use the glitch-drugs: prefix. When upgrading from it-drugs, the drug_plants table is reused and gets a glitch column, and existing plants roll genes on first start. Keep your edits to shared/config.lua, shared/lab.lua, data/lab.json and data/field.json when you replace the other files. Database changes apply themselves on start.