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#
Put the
glitch-drugSalesfolder in your resources folder. The name is case-sensitive and must stayglitch-drugSales: the rc-interactions dialogue flows call events with that name in them.Open
install/ox_inventory_items.luaand copy the items your server does not have yet intoox_inventory/data/items.lua, then restart ox_inventory. The file lists the six weed strains,cokebaggy,crack_baggy,thc_gummy,meth,blue_methandblack_money. The package has no item images, so use your own PNGs named after the items inox_inventory/web/images.There is no SQL to run.
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-drugSalesSet your city up in
config.lua, or better in a profile file (see Configuration): the Cousin'sbaseandmeets, the Dealsspots,Config.PoliceJobsandConfig.Corner.minPolice.Optional dialogue: in rc-interactions run
/interactioneditor, import the three files inrc-interactions/and press Save. The resource finds the flows by the names inConfig.Interactions.Optional Deals app: start sd-phone. The app registers itself when the phone starts.
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.