HZ Scripts

Installation

Dependencies

ResourceWhyCost
HZ-Bridgemoney, identity, notifications, permissions, admin config panelFree
oxmysqlpersistence (events, bets, ledger)Free
qs-smartphoneonly for the optional phone app

Steps

  1. Extract HZ-Bets into your resources folder (e.g. resources/[standalone]/HZ-Bets).
  2. Add it to your server.cfg after HZ-Bridge and oxmysql:
   ensure oxmysql
   ensure HZ-Bridge
   ensure HZ-Bets
  1. 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 /betsadmin opens 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).
To open it from your own resource, see Exports.

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.