A corner sale#
- The client sends the buyer's network id and the GTA zone name.
- The server checks that the buyer is a live, non-player street ped within
buyerRange, that neither of them is in a vehicle, and that the ped was not pitched in the lastbuyerReuseseconds. It refuses peds created by a script. It also checks the cooldown, on-duty police, tablet heat and maintenance. - Zone names only exist on the client, so the server accepts real zone codes only and keeps a player's zone until they have moved
zoneStickmetres. OncezoneConfirmdifferent characters have reported a zone in a square, a client that claims a different zone there gets the confirmed one. Zone-locked drugs are checked against theirareabox with the position the server sees. - The server rolls a refusal, picks the drug and the slot, prices it and rolls a robbery and an undercover buyer. The price, amount and rolls stay on the server.
- On sell, the server checks it is the same buyer, still close, and that the seller still has the items. It removes them, then pays. If the payment fails, the items go back.
Police alerts#
With ps-dispatch, the seller's client files the call so the street and gender are filled in. A call only counts if it has the code name, code, priority and message the server asked for, is near the spot and goes to police jobs. If none has arrived after Config.AlertFallbackSeconds, the server files it itself to on-duty police and adds the alert's heat on the criminal tablet. Without ps-dispatch, on-duty police get a notification and a blip.
The Cousin#
Players ask for a meet with the tablet button, or at his base when the tablet is not running. He answers after a few seconds, and a yes puts a spot on their map. When the meet goes live he waits at the roadside nearest that spot for meetMinutes. The sale uses up the meet before any bag moves, pays only for bags that were removed, and gives everything back when fewer than minBags came out. A no-show costs REP, his trust and a long cooldown. On-duty police cannot ask for a meet. A restart or a relog puts a saved meet back on the map, and a meet that ran out in the meantime is dropped with no penalty.
Deals app#
Regulars text orders while the player is open for business. The server keeps the orders, prices, spots and deadlines, and the app only shows them. A hand-over locks the order first, so one order cannot be paid twice. Logging out or switching character closes the shop and drops open orders.
What is stored#
Everything is in the resource KVP store, keyed by citizenid:
| Key | What |
|---|---|
sales:<id> |
Total dirty money from drug sales. |
drep:<id> |
REP given today, for the daily cap. |
deals:<id> |
The Deals book: customers, loyalty, open or closed. |
cousincd:<id>, cousinhint:<id>, gdsmeet:<id> |
The Cousin's cooldown, the hints already sent, and the meet that is on. |
gdsbrand:*, gdsbrands:*, gdsbrandt:*, gdsweek:*, gdscrown* |
Gummy brands, fans and the weekly crown. |
qrep |
Zone quality reputation. |
gdscellzones |
The zones confirmed in each saturation square. |
Sales totals, daily REP and gummy counters are written without waiting for the disk and flushed every 5 minutes and when the resource stops.