Installation

Step 1 — Download

After your purchase on hzscripts.com/shop, your FiveM Keymaster account receives two separate assets:

  1. Log in to keymaster.fivem.net (or portal.cfx.re/assets)
  2. Go to Granted Assets
  3. Download both:
* hz_television — the main script * hz_televisionprops — the 12 in-vehicle DashScreen prop variants (shipped as a dedicated asset so prop updates don't force a re-download of the full logic resource)
Both downloads are required. The two assets appear as separate entries on your Keymaster portal — you need to grab both. If you only download hz_television, the 12 DashScreen prop models won't stream and DashScreen placement will silently hang at lib.requestModel.
Important: use the same FiveM account that is linked to your Tebex license. The scripts are escrow-protected and require a valid license.

Step 2 — Dependencies

Required

  1. hz_lib — free asset from hzscripts.com/shop. Handles framework / inventory / target / menu / notification detection. Always use the latest version — every HZ-Television release is tested against the latest Bridge. Must start before HZ-Television. See hz_lib Installation.
  2. HZ-TelevisionProps — downloaded separately from Keymaster alongside HZ-Television (see Step 1). Streams the 12 DashScreen prop variants (hz_dashscreen + hz_dashscreen_1..11) + their calibration JSON. Must start before HZ-Television.
  3. A menu system — at least one of:
* ox\_lib (recommended) — overextended/ox\_lib * qb-menu + qb-input — shipped with QBCore / QBox
  1. A SQL driver (required for persistence, accounts, playlists, abandon cleanup). HZ-Television auto-detects both at runtime:
* oxmysql (recommended — modern, actively maintained) — overextended/oxmysql * mysql-async (legacy QBCore v1 stack) — still supported via the runtime compat shim

Optional

  • ox\_target or qb-target — for crosshair-based interaction (otherwise TextUI / DrawText3D fallback)
  • lb-phone — required for the phone companion app lb-hztelevision
Update hz_lib before updating HZ-Television. Every Hz-Script release is tested against the latest Bridge build — mismatched versions surface as "export not found" errors or missing detection at boot. Re-download hz_lib from hzscripts.com/shop whenever you grab a new HZ-Television release.
Dual SQL compatibility (v3.4.1+) — HZ-Television automatically detects whether you run oxmysql or mysql-async at boot and installs the matching MySQL.Async shim. You'll see one of these lines in the server console on startup:

[hz_television] SQL compat: detected oxmysql, MySQL.Async shim installed
[hz_television] SQL compat: detected existing MySQL.Async (mysql-async or compatible)

If you see a red ERROR: no SQL resource detected, make sure ensure oxmysql (or ensure mysql-async) comes before ensure hz_television in your server.cfg.

hz_lib centralizes detection. You don't configure framework / target / inventory per-script anymore — set them once in hz_lib/config.lua and every Hz-Script inherits. See hz_lib Configuration.

Step 3 — Files

  1. Extract both archives (hz_television.zip and hz_televisionprops.zip) downloaded from Keymaster in Step 1
  2. Place the two resulting folders in your resources/ directory — grouping them under a common category folder like [hz-scripts]/ keeps things tidy
server/
├── resources/
│   ├── ox_lib/
│   ├── oxmysql/                    ← or mysql-async (both supported)
│   ├── [hz-scripts]/
│   │   ├── hz_lib/
│   │   ├── hz_televisionprops/        ← 2nd Keymaster download (12 dashscreen props + calibration.json)
│   │   ├── hz_television/          ← 1st Keymaster download (the main script)
│   │   │   ├── client/
│   │   │   ├── server/
│   │   │   ├── html/
│   │   │   ├── config.lua
│   │   │   ├── fxmanifest.lua
│   │   │   └── ...

Step 4 — Inventory Items

HZ-Television ships 10 placeable items out of the box. Pre-configured item definitions for every supported inventory are in hz_television/items/.

Items shipped

ItemPropDescription
hz_tv_s / hz_tv_m / hz_tv_lhz_tv_*Wall-mounted Smart TVs — small / medium / large
hz_tv_s_stand / hz_tv_m_stand / hz_tv_l_standhz_tv_*_standFloor-stand Smart TVs — small / medium / large
curved_screen_s / curved_screen_m / curved_screen_lprop_curved_screen_*Curved cinema screens
hz_dashscreenhz_dashscreen + 11 variantsIn-vehicle DashScreen (placed via keyboard gizmo)

For ox\_inventory

Open ox_inventory/data/items.lua and append the content of hz_television/items/ox_inventory.txt (10 entries including hz_dashscreen).

Example entry:

['hz_tv_m'] = {
    label = 'Smart TV (Medium)',
    weight = 12000,
    stack = true,
    close = true,
    description = 'A medium wall-mounted smart TV',
    client = {
        event = 'hz_television:useItem'
    }
},
['hz_dashscreen'] = {
    label = 'DashScreen Screen',
    weight = 3000,
    stack = true,
    close = true,
    description = 'Dashboard Smart TV — use while sitting in a vehicle',
    client = {
        event = 'hz_television:useItem'
    }
},

For qb-inventory / qs-inventory / ps-inventory

Copy the content of the matching hz_television/items/<inventory>.txt file into your inventory's items file.

All items route through the same HZ-Television:useItem client event, which the script catches and dispatches to the right placement flow (static gizmo for TVs, in-vehicle keyboard gizmo for DashScreen).
Database is optional but strongly recommended — without it you lose placed-TV persistence, the account system, the personal playlist, and the abandon-cleanup feature.

Enable in config.lua:

Config.Placer = {
    Persistence        = true,   -- placed TVs + DashScreens survive restart
    MaxPerPlayer       = 0,      -- 0 = unlimited, N = cap per owner identifier
    AutoCleanupDays    = 0,      -- 0 = disabled, N = auto-remove after N days inactive
    AutoCleanupInterval = 6,     -- hours between cleanup ticks (0 = startup only)
    BlockOnRoad        = false,  -- true = block placing props on roads (DashScreen exempt)
    CleanupAdminPermission = 'admin',  -- ACE perm for /tvclean
}

The following tables are created automatically on first startup (all use CREATE TABLE IF NOT EXISTS + additive ALTER TABLE ADD COLUMN IF NOT EXISTS migrations):

  • hz_television_placed — static placed TVs (walls, floors, curved, billboards)
  • hz_dashscreen_placed — DashScreen placements keyed by vehicle plate
  • hz_tv_users, hz_tv_sessions, hz_tv_favorites, hz_tv_history, hz_tv_playlists, hz_tv_playlist_items — account / login / favorites / history / playlists (populated on first Smart TV login)

Manual install (fallback — v3.4.3+)

If a table fails to create automatically (MySQL user missing CREATE permission, connection string pointing at the wrong database, etc.), you'll see a red error in the server console right after [hz_television] SQL compat: ... with the exact table name + error. In that case, run the bundled install.sql manually:

mysql -u <user> -p <database> < resources/[standalone]/hz_television/install.sql

…or open hz_television/install.sql in phpMyAdmin / HeidiSQL / DBeaver and execute it against your server's database. Then restart hz_television. The script only contains CREATE TABLE IF NOT EXISTS statements, so running it twice is safe.

v3.4.3+ only — the old error Table 'yourdb.hz_tv_sessions' doesn't exist on login now fails cleanly with a db_not_ready response instead of crashing, and the server log points you at install.sql. Previous versions would crash the session flow.

Step 6 — server.cfg

Add the resources to your server.cfg in this order:

# Dependencies (must start BEFORE hz_lib)
ensure oxmysql                # or `ensure mysql-async` — HZ-Television supports both
ensure ox_lib                 # or qb-menu + qb-input
ensure ox_target              # or qb-target (optional)

# Framework (if applicable)
ensure qbx_core               # or ensure qb-core, or ensure es_extended
# ensure qb-core
# ensure es_extended

# HZ-Scripts — order matters
ensure hz_lib              # handles auto-detection
ensure hz_televisionprops        # streams the 12 dashscreen prop variants (separate Keymaster download)
ensure hz_television          # the TV logic resource

Startup order is critical. hz_lib, hz_televisionprops, and your SQL driver (oxmysql or mysql-async) must all start before hz_television. If hz_televisionprops isn't ensured, the 12 dashscreen variant models won't stream and DashScreen placement will silently fail at lib.requestModel. If no SQL driver is ensured, persistence silently stops working.

Step 7 — Configuration

Open hz_television/config.lua and adapt the settings. See Configuration for every option in detail.

Essentials to check before going live:
  • Config.Locale — 'en' / 'fr' / 'es' / 'de'
  • Config.Permissions — who can use /tvcfg, place TVs, use TVs
  • Config.Placer.Persistence — true to enable DB saving
  • Config.Placer.BlockOnRoad — true if you want to block road placement
  • Config.Placer.MaxPerPlayer + Config.Placer.AutoCleanupDays — abandon protection
  • Config.BillboardUseSmartTV — which billboard/cinema models should run the full Smart TV UI (default: the 3 curved cinema props + 2 vanilla huge billboards)
Framework / target / menu / notification / inventory settings are managed in hz_lib — see hz_lib Configuration.

Step 8 — Verification

  1. Start the server
  2. Console should show (in order):
* [hz_lib] <framework> detected, <inventory> detected, ... * [hz_televisionprops] shared/models.lua loaded [hz_television] SQL compat: detected oxmysql, MySQL.Async shim installed (or detected existing MySQL.Async (mysql-async or compatible))* * [hz_television] v3.4.1 loaded successfully * [hz_television] Database tables initialized
  1. Connect in-game
  2. Approach any TV prop (wall TV, curved cinema screen, or use the hz_dashscreen item in a vehicle)
  3. Select Power On → Smart TV → paste a video URL
Done! If the Smart TV UI opens and your URL plays, the script is working. Move on to Configuration to customize models, permissions, and abandon-protection thresholds.

Quick Troubleshooting

Script doesn't start

Check:


  • Folders are correctly named hz_television, hz_televisionprops, hz_lib (case sensitive)

  • All three are ensured in server.cfg in the right order (Bridge → TelevisionProps → Television)

  • Your FiveM license is valid on Keymaster

  • A menu system (ox_lib or qb-menu) is ensured before hz_lib

Error "Framework not detected"

Detection is handled by hz_lib. Make sure:


  • es_extended, qb-core, or qbx_core is ensured before hz_lib

  • hz_lib is ensured before HZ-Television

  • Check the hz_lib console line to verify auto-detection

  • Force a framework if needed in hz_lib's config.lua — e.g. HZBridge.Framework = 'esx'

DashScreen placement silently fails

Most common cause: hz_televisionprops isn't started. lib.requestModel(hz_dashscreen) hangs forever because the model isn't streamed.

hz_televisionprops is a separate download on Keymaster — not bundled with hz_television. Confirm:


  • Both assets are listed in your Keymaster Granted Assets and have been downloaded

  • The hz_televisionprops folder sits next to hz_television in resources/

  • ensure hz_televisionprops is in your server.cfg before ensure hz_television

  • Resource is listed as started in the server console

Placed TVs don't save after restart / Error "no SQL resource detected"

HZ-Television needs either oxmysql or mysql-async running. At boot the server console prints one of:

[hz_television] SQL compat: detected oxmysql, MySQL.Async shim installed
[hz_television] SQL compat: detected existing MySQL.Async (mysql-async or compatible)
[hz_television] ERROR: no SQL resource detected (oxmysql or mysql-async)

If you get the red error:


  • Make sure ensure oxmysql (or ensure mysql-async) is in server.cfg

  • It must come before ensure hz_television — if the SQL resource loads after, the runtime detection misses it

  • Both drivers are supported — pick one; don't run them simultaneously

Error "Table 'yourdb.hz_tv_sessions' doesn't exist" when a player logs in on a Smart TV

The auto-create step couldn't build one or more tables. You'll see red lines right after SQL compat: detected … during boot:

[hz_television] CREATE TABLE hz_tv_sessions FAILED: <error>
[hz_television] Import hz_television/install.sql manually to create the missing tables.

Fix (v3.4.3+):

mysql -u <user> -p <database> < resources/[standalone]/hz_television/install.sql

Or open hz_television/install.sql in phpMyAdmin / HeidiSQL / DBeaver and run it against your server's database. Then restart hz_television. The file only contains CREATE TABLE IF NOT EXISTS statements — running it twice is safe.

Common causes of the auto-create failing:


  • The MySQL user configured in set mysql_connection_string doesn't have CREATE permission on the target database → grant CREATE, ALTER, INDEX and reboot

  • The connection string points at a database the user can read but not write to → verify the DB name

  • MySQL running in STRICT mode with incompatible session settings → install.sql explicitly sets SQL_MODE = '' at the top to bypass this


If you see SQL Error 1067 (Invalid default value for 'last_login') or SQL Error 1075 (Incorrect table definition; there can be only one auto column and it must be defined as a key) when importing install.sql, you're on an older HZ-Television. Both errors were fixed in v3.4.6 — update and re-run the new install.sql.

On v3.4.3+ the login flow now aborts cleanly with db_not_ready when tables are missing, instead of crashing mid-query.

Screen stays black / no display
  • Use /tvcfg near the TV to calibrate Scale/Offset/Rotation (live cyan preview overlay shows exactly where the cursor hit-box sits)
  • Test with a simple direct video file first (not a livestream)
  • Check F8 console for JavaScript errors
  • For vanilla huge billboards, make sure the model is in Config.BillboardUseSmartTV (v3.3 render-target auto-detection handles them)
No sound or global sound
  • Increase Config.Display.MaxSoundDistance in config.lua
  • Make sure the TV is powered on
  • Get closer (volume decreases between MinSoundDistance and MaxSoundDistance)
  • For DashScreen specifically: audio has a 5 m cabin range with Web Audio occlusion. Driver + passengers get full clean audio; outside listeners get filtered+attenuated sound
TV items don't appear in inventory
  • Add the items from hz_television/items/<inventory>.txt to your inventory's items file
  • Restart the server completely after adding items (not just the resource)
  • For ox\_inventory the path is ox_inventory/data/items.lua
  • For QBCore/QBox it's qb-core/shared/items.lua or qbx_core/shared/items.lua