Usage — Lottery Creator | Quasar Store | Quasar Store
Documentation
Usage
Using Lottery Creator: placing lottery machines in game, buying and scratching tickets, balancing the prize table, player-owned machines with stock and earnings, the phone app and every setting.
/lotterycreator opens the creator. On the left is every machine on the server — a search box, a Blip badge on the ones that have one, and each one's price and account. Create Vendor starts a new machine; picking one from the list opens it for editing.
Press Select under Vendor Position. The window closes and a see-through copy of the chosen prop follows wherever you look, with a red marker and a line from your character to it. You keep walking and turning the camera as usual; the point lands on whatever you are looking at, up to 50 metres away.
Key
Does
Left click
Place the machine here.
Z / X (hold)
Turn it slowly, for fine alignment against a wall.
Mouse wheel
Turn it 15° per notch.
The creator reopens with the position and heading filled in. Press Save and the machine spawns for every player at once — no restart. A model the game cannot find is refused before the preview starts, with Model … is not valid.
Pick it in the list, change the form and Save. The machine respawns for everyone; its owner, earnings and stock are kept.
Teleport
The teleport button on its card puts you beside it, to check it in person.
Delete
The delete button, then confirm. The machine disappears for everyone and its row is removed — owner, earnings and stock with it, and nothing is refunded.
The prop list is Config.VendorProps. It ships with the lottery machine streamed by lottery_machine and two GTA vending machines; any spawnable model can be added, your own included:
At a machine, the target offers Buy <name> - $<price>; without a target, walk up and press E. The character makes a short hand-over gesture, the price is taken from the machine's payment account, and a scratchcard lands in the inventory. The server checks that the player can pay before anything changes hands.
What a machine sells depends on its state:
State
Tickets
Notes
Server machine — no owner, not for sale
Sold
Unlimited tickets. The money leaves the economy.
For sale — no owner, listed
Not sold
Not in service: the only option is Buy machine.
Owned, with stock
Sold
Each ticket uses one unit of stock and pays the owner.
Owned, empty
Not sold
The ticket option disappears until the owner restocks.
A machine restricted to jobs shows its ticket option only to players with an allowed job and grade. With player ownership turned off, every machine is a server machine.
Using the scratchcard from the inventory opens the card. The character holds a lottery ticket with a clipboard animation, and the mouse becomes a coin: hold the button and drag to scratch. The six squares are drawn on the server the moment the card is used, and the ticket is consumed — what is under the foil is decided before the first scratch.
Clear about a quarter of the card and the rest reveals itself, with the prizes lighting up.
Claim prize pays the total. Close on a winning card claims it too, so a prize is never lost by closing.
A losing card only offers Close, with Better luck next time!
Each of the six squares rolls on its own against the table, and the card pays the total of every winning square: three $10 squares pay $30, a $10 and a $1,000 pay $1,010. The odds of one square landing on a reward are its chance divided by the sum of all chances.
average per card = 6 × Σ(amount × chance) ÷ Σ(chance)
With the shipped table that is 6 × 675 ÷ 89.7 ≈ $45 a card, against a $30 ticket. About half of all cards win something, and on average players take out more than they put in. To turn the lottery into a money sink, raise the NO WIN weight or lower the prizes — raising NO WIN from 80 to 150 alone brings the average down to about $25 a card.
Owned machines do not change this maths. The owner earns from the ticket price and the prizes are paid by the system on top, so a generous table costs your economy, never the owner.
With Config.Ownership.enabled, a machine can be bought and run by a player, like a vending-machine business: they set the price, keep it stocked and collect what it earns.
Tick For sale in the creator's Ownership section and set its purchase price — 25,000 by default. While it is listed and unowned, the machine sells no tickets: players walking up see Buy machine - $25000.
The purchase screen shows the price, the account it is paid from (bank by default), the current ticket price and how much of every ticket the owner keeps. A player may own up to Config.Ownership.maxPerPlayer machines — two by default, 0 for unlimited.
A bought machine starts empty: it sells nothing until its new owner loads ticket stock.
The owner walks up and picks Manage machine — on the target, or G beside the ticket prompt (E when it is the only option).
Section
What it does
Ticket price
What a ticket costs, inside priceLimits — $5 to $1,000 by default. Customers see the new price at once.
Ticket stock
Tickets loaded, out of maxStock (500). Restock loads more for restockCost per ticket ($5) from the owner's account — no item needed. Each sale uses one.
Available earnings
What sales have earned since the last collection. Collect pays it into the owner's account.
Figures
Tickets sold, total revenue before commission, and the commission rate.
Sell machine
Sells it back for resaleRefund of the purchase price (50%) plus any earnings not yet collected. Loaded stock is lost, and the machine goes straight back on sale. Hidden when allowResale is off.
Only the owner can collect, restock or sell. Earnings, stock and figures are written to the database as they change, so they survive a restart.
A framework admin who opens Manage machine on an owned machine also sees an Admin section, and can change its ticket price:
Control
What it does
Listed for sale · Purchase price
The machine's sale settings, the same ones the creator edits.
Evict owner
Removes the owner. Uncollected earnings and loaded stock are cleared without a refund. The machine goes back on sale only if defaultForSale is on; otherwise it becomes a server machine.
Config.Ownership.enabled = false makes every machine a fixed-price server machine: no Buy or Manage option, and no Ownership section in the creator. Owners, earnings and stock stay in the database untouched, and come back if you turn it on again.