np_billiards
Pool in the bars of Los Santos, on GTA's own tables. Walk up to the table in the Yellow Jack Inn or Tequi-la-la, challenge whoever is standing around, put money in escrow and play 8-ball, 9-ball or straight pool. The server runs the ball physics and referees every shot, the bar watches and bets, and the Pool League app keeps the standings.
- Version
- 1.0.0
- Frameworks
- ESX, qbx, qb, standalone
- Dependencies
- oxmysql, np_prophandler 1.1.0+
- Database
- Tables created on start
- Inventory
- np_inventory, ox_inventory, qb-inventory, ESX
- Optional
- np_payments, np_hud, np_phone, np_menu, np_admin and more
- Languages
- English
- Build
- Node 18+ to build the NUI once

Taken from the NUI in the browser at 1920×1080, with mock data.
What's in it
The server simulates and judges every shot. Your client replays the same shot and snaps to the server's result.
GTA's own tables
- Binds to the vanilla pool tables in the bars. np_prophandler hides the map balls, rack and cue on them while it owns the table, and its own balls stay visible.
- Or spawn a table anywhere: player-owned bars, custom MLOs, or an export.
Deterministic physics
- Sliding and rolling friction, follow, draw and stun, side spin with squirt and throw, english off the cushions, masse and jaws.
- Fixed 5 ms steps with continuous collision detection, so the same strike gives the same bits on the server and every client.
The server is the referee
- 8-ball with called pockets, open table, groups and ball in hand. 9-ball with the golden break and the three-foul rule.
- Straight pool (14.1) with called balls, fouls and the re-rack. Every shot is logged.
Stakes and side bets
- Both stakes are taken when the challenge is accepted and held in escrow, fees and the house cut go to the bar.
- Spectators bet into a pari-mutuel pool that locks while balls move. Players can't bet on their own match.
Rank and gear
- ELO per mode, tiers from Fish to Legend, seasons, rivals and achievements.
- Cues, shafts, chalk and gloves are items with tip wear, wraps and a league-legal cap on ranked tables.
Works with your server
- ESX and np_inventory first, also qbx, qb, ox_inventory, qb-inventory or the ESX inventory.
- A bar owner tablet, cups and the Pool League app in np_phone.
- Staff permissions through np_admin, no ox_lib, no ACE.
A closer look
Stroke, don't click
Press E at a table (or "Play pool" in np_menu) to open the lobby. C switches between the overhead and the shoulder cam.

- Aim at the mouse in the overhead cam (Shift = fine), or drag with the right button in the shoulder cam. The ghost ball shows object-ball and cue-ball stubs, by cue stat.
- Spin with W A S D on a real cue-ball face with a miscue rim, Q and E for elevation. V calls a pocket, X a safety.
- Stroke: hold the left button, pull back, push through. The push speed is the power and sideways drift is angle error. P switches to an assisted click-hold-release stroke.
- Drinks make it a bar: one steadies the hand, from two the sway ellipse around the ghost ball grows, from five the camera swims.
8-ball, 9-ball and straight pool
The server simulates every shot and judges it. Every shot is logged with its ball, cut angle, spin and rails.


| Game | The referee checks |
|---|---|
| 8-ball | Called pocket, open table, groups, the 8, the 8 on the break, illegal breaks, scratches, ball in hand anywhere or in the kitchen |
| 9-ball | Lowest ball first, the golden break, the three-foul rule |
| Straight pool | 14.1: called balls, −1 for fouls, −15 on three, the 14-ball re-rack, race to N points |
- Fouls: scratch, no contact, wrong ball, no rail, illegal break and the shot clock, each a server event.
- R replays the last shot slowly, T extends the shot clock. Leaving mid-match forfeits, a crash gets a 90 s rejoin window.
Stakes, spectators and side bets
Spectators within 8 m get the HUD, cycle the cameras with TAB, react with 1 to 5 and open the side bets with B.

| Part | How it works |
|---|---|
| Stakes | Both taken when the challenge is accepted, held in escrow and paid out minus the house cut. A restart refunds anything still held |
| Fees | Table fees, the house cut and the rake go to the bar's society |
| Side bets | A pari-mutuel pool on the winner, "next ball down is a stripe" and hill-hill, paid minus the bar's rake |
| Fair play | Bets lock while balls move, players can't bet on their own match, odd results on big pools are flagged to staff |
| Crowd | Clap, ooh, toast, heckle and cheer with vanilla animations. Heckles add a sway pulse |
ELO, seasons and the cue case
/poolprofile opens your profile, /cuecase the cue case. H chalks the cue at the table.


- ELO overall and per mode with a provisional K. Tiers Fish, Hustler, Shark and Legend (III to I), six-week seasons with a soft reset.
- Achievements: golden break, table runner, comeback kid, bar crawler, liquid courage, hustler, lucky 8, lockdown and century.
- Cues: house cues everywhere. Owned cues, shafts, chalk and gloves are items with a serial, tip wear, racks, wins and break-and-runs.
- Stats trade power for touch, and ranked tables cap the total. Tips wear and are re-tipped with a kit, wraps unlock with achievements.
Bar owners, referees and cups
Give a bar an owner and a referee (a job and grade), then /poolroom opens the owner tablet.

- Tables with live balls and cloth wear. Recover the cloth for $400 and the table closes for an hour.
- Revenue of the last 7 days: fees, house cut, rake and upkeep.
- Referees pause or void a match, with stakes and bets refunded.
- Cups: single elimination seeded by ELO, entries in escrow, called matches, walkovers after a no-show and a prize split with the rake to the bar.
The Pool League app
With np_phone running, Pool League is in the phone's app store, and the Dynamic Island shows the live score and "your shot".



- Standings for the whole server or your bar.
- Cups with live brackets.
- Remote challenges with escrow on accept, played later at that bar.
- Open tables nearby, and watching a live match from the phone.
Set it up
Compatibility
ESX with np_inventory is the first target. np_prophandler 1.1.0 or newer is required. Every other integration is optional, detected with GetResourceState and called through pcall.
| Inventory | Items |
|---|---|
| np_inventory | Cue, shaft, chalk, glove and re-tip kit registered at runtime, with metadata and a busy lock while playing |
| ESX inventory | Import sql/items_esx.sql |
| ox_inventory | Paste the five items from the docs into data/items.lua |
| qb-inventory | Through the same bridge |
| Sibling | What np_billiards does with it |
|---|---|
| np_payments | Table fees to the bar, stakes, bet and cup entries through Charge, refunds through Refund |
| np_hud | Challenge toasts with Accept and Decline, the table prompt, zone claims while playing |
| np_phone | The Pool League app, push notifications and the Dynamic Island |
| np_menu | "Play pool" and "Owner tablet" on the table props |
| np_admin | Permission nodes, live settings, staff actions, the audit log and the server theme |
| np_drugs | Blood alcohol for the aim sway, or esx_status drunk |
Also detected: np_discord for match, void, cup and flag logs, np_character for names on standalone, and esx_addonaccount, qb-banking, qb-management or Renewed-Banking for the bar's society income. GTA V has no pool minigame script, so nothing of Rockstar's runs at the tables.
Installation
The tables are created on the first start. You build the NUI once.
- Put the resource in
resources/asnp_billiardsand build the NUI once (Node 18+),web/distis not committed:cd web && npm ci && npm run build - Items: np_inventory needs nothing. For the ESX inventory import
sql/items_esx.sql, for ox_inventory paste the items from the docs. - Start it after its dependencies:
ensure oxmysql ensure es_extended ensure np_inventory # optional ensure np_payments # optional ensure np_hud # optional ensure np_phone # optional ensure np_prophandler # required, 1.1.0+ ensure np_billiards - Give your bars an owner in
config/tables.lua, for exampleowner = { job = 'yellowjack', grade = 3 }. Fees, the house cut and the rake go to that society.
For your own scripts
Server exports for ratings, tables, matches, cups, drinks and cues, and server events for every match, rack, foul and settled bet.
-- your own bar: a table prop in your MLO
exports.np_billiards:RegisterTable({ id = 'mybar_1', bar = 'mybar', label = 'Table 1',
model = 'prop_pooltable_02', coords = vector3(0.0, 0.0, 0.0), heading = 90.0 })
-- a drink from your bar script counts for the sway
exports.np_billiards:SetDrinks(src, 2, 600)
-- a Friday cup at the Yellow Jack
exports.np_billiards:CreateCup('yellowjack', { name = 'Friday 9-Ball', mode = '9ball', size = 8, entry = 100 })- Server:
GetPlayerPoolRating,GetTableState,GetMatch,IsPlaying,StartMatch,VoidMatch,GiveCue. - Events:
matchStarted,matchEnded,rackEnded,foul,goldenBreak,breakAndRun,betSettledandcupEnded. - Client:
IsPlaying,IsOpen,OpenLobbyandOpenCase.
Questions
Which frameworks does it support?
es_extended first, then qbx_core and qb-core, detected at start. Without a framework it runs standalone and uses np_character for names when it runs.
Do I need np_inventory?
No. np_inventory is the first target: the cues and their parts register on their own and keep serial, wear and history in metadata. The ESX inventory, ox_inventory and qb-inventory work with the item lists from the docs.
Does every player see the same shot?
Yes. The physics use fixed 5 ms steps and only basic arithmetic inside the loop, so the same strike gives the same result on the server and every client. Clients replay the shot and snap to the server's result.
Where are the tables?
The vanilla tables in the Yellow Jack Inn and Tequi-la-la are configured. Add your own bars in config/tables.lua or with RegisterTable, on prop_pooltable_02 or prop_pooltable_3b.
Does it use ACE permissions?
No. Staff tools check the np_admin nodes np_billiards.admin, np_billiards.owner and np_billiards.referee. Without np_admin, the console, the fallback identifiers and the ESX admin groups count.
Can I change the rules and the physics?
Yes. Game modes, house rules, gear, friction, restitution and spin decay are plain Lua config files. With np_admin running, most settings can be edited live in Resource settings.
Which languages does it ship?
English. The texts are in a locale file, so a translation is one more file.
Works well with

Build once, ensure it, rack 'em up.
Installation, every config key and every export are in the docs.