Installation
Dependencies
| Resource | Why | Cost |
|---|---|---|
| HZ-Bridge | money, identity, notifications, permissions, admin config panel | Free |
| oxmysql | persistence (events, bets, ledger) | Free |
| qs-smartphone | only for the optional phone app | — |
Steps
- Extract
HZ-Betsinto yourresourcesfolder (e.g.resources/[standalone]/HZ-Bets). - Add it to your
server.cfgafter HZ-Bridge and oxmysql:
ensure oxmysql
ensure HZ-Bridge
ensure HZ-Bets
- Start the server. The MySQL tables are created automatically on first boot.
The UI ships pre-built (
web/dist). You do not need Node.js or to run a build — just ensure the resource.Database
Tables (hz_bets_events, hz_bets_selections, hz_bets_wagers, hz_bets_ledger) are created and migrated automatically on start. An optional sql/hz_bets.sql is included if you prefer to import them by hand.
Admin permission
The admin screen (create / settle / void events) is gated server-side. HZ-Bets asks HZ-Bridge whether the player has the Config.Admin.Permission group (default admin). If your bridge build has no permission helper, it falls back to the ACE node hz.bets.admin:
add_ace group.admin hz.bets.admin allow
The admin tab in the UI is convenience only — the server re-checks permission on every admin action. A player without permission calling the callbacks directly is rejected.
Opening the app
Every trigger calls the same door — all toggleable in config/config.lua:
- Command —
/bets(and/betsadminopens straight to the admin tab). - Keybind — set
Config.Entry.Command.Keybind = 'F7'(rebindable in GTA settings). - Bookmaker NPC + zone — set
Config.Entry.NPC.Enabled = true(uses the HZ-Bridge target abstraction: ox_target / qb-target / interact / built-in).
Phone app (optional)
Install HZ-Bets-Phone alongside, ensured after qs-smartphone, HZ-Bridge and HZ-Bets. The Bets app then appears in the phone's app list automatically — no extra config.
