Studios
Casinohouse-3.jpg

Commands & Exports

SoonCasinoQBCore · Qbox · ESX
PAGE 06 OF 09  ·  TROUBLESHOOTING → COMMANDS & EXPORTS → CASINO TEMPLATESdocs.glitchstudios.dev
Browse docs

Commands#

Command Who What
/casinos Casino admins (Config.AdminGroups) Opens the casino creator. Owners and managers open management from the casino itself.
/casino on, /casino off ACEs in ConfigSV.OpenClose.aces, and the console Opens or closes every casino. Without an argument it prints the current state. It can lock a door and send players outside, and the state survives a restart.
/casinoadmin The ACE in ConfigSV.Rigging.ace Opens the rigging panel when rigging is enabled.
/hhscreen, /slotscreen Casino admins Tunes where the game is drawn on Harbour Heist and slot cabinets, and saves it for every machine.
/mapobjects Casino admins Map object mode in the creator: hide or show map props in a casino.
/setwheelticket [casinoId] [entityId] [true|false] Casino admins and the console Sets whether a lucky wheel costs a lucky ticket.

Server exports#

Export Returns
exports['glitch-casino']:GetCasino(casinoId) The casino table.
exports['glitch-casino']:GetCasinoEntity(casinoId, entityId) One table, machine, cashier or store.

There are no client exports.

State#

Name Meaning
GlobalState.casinoOpen true while the master switch is on. Late joiners read the current state from it.

Events#

Event Side Purpose
glitch-pauseMenu:legend:request Client glitch-pauseMenu asks for casino blip names. The resource answers with glitch-pauseMenu:legend:name.

Placeable table and machine items are registered as usable items from Config.PlaceableEntities. Using one starts placement.

Events prefixed pickle_casinos: and glitch_casino: link the client and server. Range, cooldown and permission checks run on the server. They are not a stable API, so do not trigger them from other resources. The pickle_casinos: prefix and the table names are kept from pickle_casinos on purpose, so an existing pickle_casinos database keeps working.

Database tables#

Table Contents
pickle_casinos One row per casino: settings, entities, owner, balance (BIGINT), VIP passes and lucky wheel cooldowns.
pickle_casino_transactions The transaction log. Every round that does not break even adds one row with the house's net result.
pickle_casino_ticket_progress Lucky ticket progress per character.