Studios
Drug Saleshouse-3.jpg

Installation

SoonDrug SalesQbox
PAGE 02 OF 07  ·  OVERVIEW → INSTALLATION → CONFIGURATIONdocs.glitchstudios.dev
Browse docs

Requirements#

The server

Framework qbx_core (Qbox). ESX and plain QBCore are not supported.
Resources ox_lib, ox_target, ox_inventory
OneSync On, with population sync left on. Street peds must be networked for the "Offer drugs" option.
Database None. Everything is stored in the resource KVP store.
Optional glitch-criminaltablet (ranks, heat, REP, turf, the Cousin's tablet button), glitch-xpSystem (dealing XP and perks), glitch-drugs and glitch-methCar (purity, strain traits, gummy brands and signed meth), sd-phone (Deals app), rc-interactions (NPC dialogue), ps-dispatch (police calls with street names)

Tested with qbx_core 1.24.0, ox_lib 3.40.0, ox_inventory 2.48.0, ox_target 1.17.2, sd-phone 1.0.10 and ps-dispatch 3.0.0.

Installation steps#

  1. Put the glitch-drugSales folder in your resources folder. The name is case-sensitive and must stay glitch-drugSales: the rc-interactions dialogue flows call events with that name in them.

  2. Open install/ox_inventory_items.lua and copy the items your server does not have yet into ox_inventory/data/items.lua, then restart ox_inventory. The file lists the six weed strains, cokebaggy, crack_baggy, thc_gummy, meth, blue_meth and black_money. The package has no item images, so use your own PNGs named after the items in ox_inventory/web/images.

  3. There is no SQL to run.

  4. Add to server.cfg, after ox_lib, qbx_core, ox_inventory and ox_target, and after any optional resource you use:

    ensure ox_lib
    ensure qbx_core
    ensure ox_inventory
    ensure ox_target
    # optional, before glitch-drugSales
    ensure sd-phone
    ensure ps-dispatch
    ensure rc-interactions
    ensure glitch-xpSystem
    ensure glitch-criminaltablet
    
    ensure glitch-drugSales
    
  5. Set your city up in config.lua, or better in a profile file (see Configuration): the Cousin's base and meets, the Deals spots, Config.PoliceJobs and Config.Corner.minPolice.

  6. Optional dialogue: in rc-interactions run /interactioneditor, import the three files in rc-interactions/ and press Save. The resource finds the flows by the names in Config.Interactions.

  7. Optional Deals app: start sd-phone. The app registers itself when the phone starts.

  8. Restart the server, put a bag of weed in your pockets and walk up to someone on the street.

[!NOTE] With the default Config.Corner.minPolice = 1, nothing sells until at least one police officer is on duty. Set it to 0 to test alone.

Permissions#

The two admin test commands are off by default. With Config.TestCommands = true, both need the group.admin ACE:

add_principal identifier.license:xxxxxxxx group.admin

Config.GummyStaffOnly is off by default. If you turn it on, players need one of the ACEs in Config.GummyStaffOnly.aces (default admin) to sell THC gummies. Give staff that ACE, or change the list to a name of your own:

add_ace group.admin admin allow

Commands#

Command Who What
/cousinmeet group.admin, only with Config.TestCommands = true Starts a Cousin meet for you, live in a few seconds. It skips rank, bags and cooldown.
/dealsorder group.admin, only with Config.TestCommands = true One of your Deals regulars texts you an order now.

Updating#

Keep your profile/ files and your edited locales/*.json, replace everything else, then restart the resource. Saved data lives in the KVP store, so it carries over. Read CHANGELOG.md for new config values. If you changed config.lua directly instead of using a profile, compare it with the new one before you replace it.