REX POOL
Synced billiards with real physics for FiveM
Rex Pool is a full billiards system for your server: 8-ball, 9-ball, straight pool and free table, playable on every vanilla pool table of the map and on any table you place yourself. A single deterministic physics engine runs on the server and on every client, so every player and every spectator sees exactly the same shot.
Important: Rex Pool requires ox_lib. oxmysql is optional and only needed for stats and the leaderboard.
ABOUT
We wanted a pool script where a shot behaves like a shot: the cue ball draws back when you hit low, follows through when you hit high, english bends the cushion rebound, and a ball can rattle in the jaws when you hit it too thin. And we wanted everyone around the table to see the same thing.
- Aim camera behind the cue ball, or a top-down view with one key
- Aim line, ghost ball, object ball direction and cue ball path, with the assist level set per mode and per lobby (none / short / ghost ball / full)
- Top spin, back spin and left / right english from a spin selector on the cue ball
- Power by pulling the mouse back and pushing to strike, or a hold-and-release meter
- Vanilla cue prop and animations, with sounds for ball clicks, cushions, pockets and the cue tip, volume by distance
GAME MODES
Four modes
- 8-Ball – open table, solids / stripes, the 8 last
- 9-Ball – lowest ball first, combos on the 9 count
- Straight Pool (14.1) – one point per ball, re-rack of 14, target 15 / 25 / 50 / 100
- Free Table – no rules, anyone at the table can shoot, drop-in up to 4 players
Automatic rules engine (optional)
Every mode can be played with the automatic rules engine on or off, chosen in the lobby.
- Fouls: scratch, no ball hit, wrong ball first, no cushion after contact, 8 too early / with a scratch / in the wrong pocket
- Ball in hand anywhere, or behind the head string after a scratch on the break
- Turn switching, 1v1 or 2v2 with player rotation
- Win / loss detection, optional call pocket, shot clock
SYNCED PHYSICS
The engine
- Fixed-step simulation with sliding and rolling friction, so follow, draw and stun shots come out naturally after the hit
- Ball-to-ball collisions and cushions with restitution, english that changes the rebound angle
- Real pocket mouths and jaws: a ball can rattle out
- Mapped onto the table from the prop position and rotation, so any table placed at any angle works
Server-authoritative sync
- The shooter only sends the shot parameters; the server checks the turn and the values, then runs the shot itself
- Every client replays the shot locally with the same engine: smooth at any FPS, no ball entity is networked
- At the end of every shot the server sends a checksum and the final positions; if a client drifted, its balls glide back to the server state
- Spectators within range see everything live, cue movement and ball-in-hand placement included
FEATURES
Money
- Wagers between players, held by the server until the end of the match. Winners share the pot, optional house cut. Cancel, reset vote or admin close = refund
- Table rental paid by the host, per zone, optionally credited to a job / society account (for example the Yellow Jack)
Matches
- 1v1 or 2v2, plus solo practice on a free table
- Table lobby: mode, rules, format, aim assist, call pocket, target score
- Reset at any time (instant on a free table, vote when money is at stake), rematch with the same players
- Spectate any running table
- Broadcast-style scorebug at the top of the screen: players, active shooter, group, remaining balls, shot clock
- Your own ped fades on your screen only when it blocks the aim camera; other players still see you normally
Stats & leaderboard
- Wins, losses, balls potted, fouls, best break, best run, earnings (oxmysql)
/poolstats leaderboard
Tables
- Works on every vanilla pool table prop (
prop_pooltable_02 / prop_pooltable_3b) in the map and in any MLO using them - Permanent tables through
Config.SpawnTables, and /poolspawn to place a test table in front of you /poolscan lists every table around you with coords and heading, /pooldebug draws the physics geometry on a table- In-game
/poolcalibrate tool (admin): tune the play area, cloth height, centre and pocket mouths of a table model live, with test shots that show the rebound points. One key saves it for every player, no restart
Admin panel
/pooladmin (ACE): live tables (go to, re-rack, close with refund, disable a table)- Economy settings saved on the server: rental, wagers, max wager, house cut
- Match history and spawned tables
FRAMEWORKS & REQUIREMENTS
Frameworks
- ESX (new export)
- QBCore
- QBox
- Standalone (money features off)
Requirements
- ox_lib (required)
- oxmysql (optional, for stats and leaderboard)
- ox_target or qb-target (optional), or the built-in [E] prompt with marker
WHAT YOU RECEIVE
- The escrow-protected
rex_pool resource - Open files: config, locales, bridge, install files, table calibration and the NUI (HTML / CSS)
- Fully commented config, keybinds and language
- Locales: English, French, Spanish (add your own in one file)
- SQL tables created automatically on start (SQL file included if you prefer to import by hand)
- Documentation: README with quick-start, controls and calibration guide, plus the online docs
SUPPORT
Rex Studio – rex-studio.com