Studios
Drug Saleshouse-3.jpg

Commands & Exports

SoonDrug SalesQbox
PAGE 06 OF 07  ·  TROUBLESHOOTING → COMMANDS & EXPORTS → HOW SALES WORKdocs.glitchstudios.dev
Browse docs

Commands#

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

Server exports#

Export Returns
GetDrugSales(src) The character's total drug sales in dollars.
RecordSale(src, amount, kind) Nothing. Adds a sale made by another resource to the sales total and the daily tablet REP.
TurfPriceBonus() Config.TurfBonus.
GetCornerMap(src) { { zone, x, y, sat, quality } } with live corner saturation, or nil for players without the deal_kingpin perk.
GetGummyTrend() { hot, cold }, today's flavours.
GetTopBrands(src) The city's top gummy brands: { brand, key, sold, mine, crowned }. src is optional and marks that player's own brands.
GetBrandFans(src, brand) Sold count, loyalty bonus in whole percent, weekly rank and fans gained this week.
CousinHint(src, why) true when a hint was sent. why is rank, botanist or cook.
HasDealsApp(src) Whether sd-phone should show the Deals app to that player.

Client exports#

None.

Events#

Event Side What
glitch_criminaltablet:contactActionUsed Server, listens (src, contactId, actionId). Raised by the criminal tablet. The Cousin's contact and meet button (Config.Tablet.cousinContact, meetAction) ask for a meet.
ps-dispatch:server:notify Server, listens Matches a seller's ps-dispatch call against the alert the server asked for.

The resource has no client-to-server net events of its own. Offers, sales, the Cousin and the Deals app all go through ox_lib callbacks, which are internal to the resource. GlobalState['gds:cousinBase'] holds the Cousin's base for clients.