Poker
Player versus player No-limit Texas Hold'em at staff-placed tables. The server shuffles, deals, runs every rule and holds every dollar. The client only asks.
#Setup
ensure GR1M_Pokerafteroxmysql,ox_lib,ox_targetandqbx_core. Tables create themselves.ensure GR1M_Placertoo, or staff can't place tables.- In game, run
/pokeradmin, then Place new table. A see-through copy follows your aim: line it up over the table, then each chair clockwise, then the dealer (ESC skips the dealer). Each stamped piece stays visible until you finish.
For a table the map already has, pick Casino table in the map or Saloon table in the map. Nothing is spawned for it, and Chairs already there does the same for its chairs.
Staff can move, add or remove a dealer on a placed table at any time with Move dealer and No dealer. Tables work without one.
#Playing alone
Play alone in the seat screen starts a practice game on an empty table: one player against bots, with play chips. No money moves, nothing is raked or logged, and running out just deals more chips. Other players can't join until it ends, which is when the player stands up or misses two turns in a row. Staff can end it with Close table and refund.
Admins are the admin and god groups or gr1m_poker.admin. Owners are god or gr1m_poker.owner. Only owners see dealt cards in hand history or set the Discord webhook.
#How a hand runs
- Rules live in
shared/engine.lua: blinds, heads-up order, minimum raises, short all-ins that don't reopen betting, side pots, uncalled bets, split pots and rake. Hand ranking isshared/cards.lua. Neither uses natives. server/rng.jsshuffles with Node'scrypto.randomInt. If it fails, the table pauses and no cards are dealt.- Hole cards go only to the seat that owns them, in that player's own event. They never go in a state bag, GlobalState or a broadcast. Bystanders get who's playing, the board and the pot.
- Everyone still in at a showdown shows their cards. A winner everyone folded to shows nothing.
- A missed turn checks if it's free, otherwise folds. Two misses in a row sit the player out.
#Money
- Buy-ins come from cash or bank in plain dollars. Dirty money and rcore chips aren't used.
- A table stack lives in
gr1m_poker_seats, saved before each hand's blinds and after each hand. - Standing up mid-hand folds, and the stack comes back when that hand ends, to where it came from.
- On a crash or restart every row becomes
table_id = 0and is paid to the owner at next login. The saved stack is from before the hand, so bets in play are refunded. - A hand whose money doesn't add up pays nothing, restores the stacks and logs an error.
- Rake is 5% capped at $500 by default, with none if there's no flop. It goes to the table's UltraBoss account,
govby default. If UltraBoss is stopped, no rake is taken.
#Staff panel
/pokeradmin has Tables, Live, Hand history and Flags. Live shows stacks and pots, never hole cards. Flags note repeated big losses to the same player and repeated timeouts, and nothing happens by itself.
Close table and refund ends the hand, returns every bet and pays everyone out.
The Discord webhook is pasted under Flags and kept in server KVP. It posts big pots, table closures and flags.
#Things to tune in game
SeatZOffsetinconfig.luasets how high the sitting pose is.Felt heighton a table sets where the board cards lie. 0 measures the prop, and tables with no prop useDefaultFeltHeight.
GR1M