Configuration

All settings are in config.lua, which stays open (not encrypted). By default, every detection setting is on 'auto' — you only need to change them if auto-detection doesn't work for your setup.


Framework

HZBridge.Framework = 'auto'

OptionDescription
'auto'Auto-detect (recommended)
'esx'Force ESX
'qbcore'Force QBCore
'qbox'Force QBox (QBX)
'ox'Force Ox Core
'vrp'Force vRP
'standalone'No framework
Detection order: es_extended > qbx_core > qb-core > ox_core > vRP > standalone

Inventory

HZBridge.Inventory = 'auto'

OptionDescription
'auto'Auto-detect (recommended)
'ox_inventory'Force ox\_inventory
'hz_inventory'Force hz\_inventory (uses the ox\_inventory adapter)
'qs-inventory'Force qs-inventory
'ps-inventory'Force ps-inventory
'codem-inventory'Force codem-inventory
'core_inventory'Force core\_inventory
'origen_inventory'Force origen\_inventory
'tgiann-inventory'Force tgiann-inventory
'qb-inventory'Force qb-inventory
'ak47_inventory'Force ak47\_inventory
'framework'Use framework native inventory
Detection order: hz_inventory > ox_inventory > qs-inventory > ps-inventory > core_inventory > origen_inventory > tgiann-inventory > codem-inventory > ak47_inventory > qb-inventory > framework
  • qb-inventory comes last because it ships with QBCore: a server that runs another inventory next to it uses that one.
  • hz\_inventory is reported as ox_inventory by GetDetectedInventory(), since it uses the same adapter.
  • On QBox and Ox Core, hz_lib uses ox_inventory even before it has started.
  • In 'auto', an inventory that starts after hz_lib is picked up when it starts. A forced value turns this off.

Notifications

HZBridge.Notifications = 'auto'

OptionDescription
'auto'Auto-detect (recommended)
'ox_lib'Force ox\_lib notifications
'okok'Force okokNotify
'mythic'Force mythic\_notify
'codem'Force codem-notification
'pnotify'Force pNotify
'framework'Use framework native notify
'gta'GTA V native text

Target / Interaction

HZBridge.Target = 'auto'

OptionDescription
'auto'Auto-detect (recommended)
'ox_target'Force ox\_target
'qb-target'Force qb-target
'interact'Force interact system
'builtin'Built-in TextUI fallback

HZBridge.Menu = 'auto'

OptionDescriptionFeatures
'auto'Auto-detect (recommended)—
'ox_lib'Force ox\_libContext, Input, Alert, TextUI, Progress, Menu
'qb-menu'Force qb-menuContext, Input (qb-input), TextUI (qb-core)
'esx'Force ESX menuContext, List menu, TextUI
'native'GTA native fallbackKeyboard input, help text (limited)
Detection order: ox_lib > qb-menu > esx_menu_default > native
The 'native' fallback provides basic functionality but is limited. For the best experience, install ox\_lib or qb-menu.

Dispatch

HZBridge.Dispatch = 'auto'

OptionDescription
'auto'Auto-detect (recommended)
'cd_dispatch'Force cd\_dispatch
'ps-dispatch'Force ps-dispatch
'qs-dispatch'Force qs-dispatch
'rcore_dispatch'Force rcore\_dispatch
'emergencydispatch'Force emergencydispatch
'builtin'Built-in notification + blip

Banking / Society

HZBridge.Banking = 'auto'

The society (job or gang boss) account that HZ scripts pay into and take from, for example business payouts.

OptionDescription
'auto'Auto-detect (recommended)
'hz_banking'Force HZ-Banking
'qb-banking'Force qb-banking
'qb-management'Force qb-management
'Renewed-Banking'Force Renewed-Banking
'okokBanking'Force okokBanking
'qs-banking'Force qs-banking
'tgg-banking'Force tgg-banking
'crm-banking'Force crm-banking
'tgiann-bank'Force tgiann-bank
'esx_society'Force esx\_society
'none'No society account (payouts off)
Detection order: hz_banking > qb-banking > qb-management > Renewed-Banking > okokBanking > qs-banking > tgg-banking > crm-banking > tgiann-bank > esx_society > none
  • The bank is detected once, when hz_lib starts. A bank resource that starts after hz_lib is not seen: force it here.
  • Exception: in 'auto', HZ-Banking takes over when it starts after hz_lib, and hands back to the previous bank when it stops.
  • Some banks only allow adding money. Scripts check this with the GetBankingSupports export.

Callbacks

HZBridge.Callback = {
    Timeout   = 15000,  -- ms before timeout (default 15s)
    RateLimit = 50,     -- max requests/second per player (0 = disabled)
}

ParameterTypeDescription
TimeoutintegerMilliseconds before a callback times out
RateLimitintegerMax requests per second per player (0 = no limit)

Dispatch relay

HZBridge.DispatchRelay = {
    RateLimit         = 5,
    RateLimitWindowMs = 10000,
    MaxTextLength     = 200,
    MaxJobs           = 20,
}

Limits the server applies to the dispatch alerts players send through hz_lib.

ParameterDefaultDescription
RateLimit5Max alerts per player in one window (0 = no limit)
RateLimitWindowMs10000Length of the window, in ms
MaxTextLength200Title, message and code are cut to this many characters
MaxJobs20Max jobs one alert can target

Locale

HZBridge.Locale = 'en'

Language of the admin panel, of hz_lib's own messages and of the NPC dialogue key prompts. Ships with 'en' and 'fr'. You can add locales/<lang>.lua for hz_lib's messages; the panel itself only exists in English and French, and shows English for any other language.


Admin panel

HZBridge.Panel = {
    AcePermission      = 'admin',
    DevAllowAll        = false,
    RateLimitWrites    = 10,
    RateLimitWindowMs  = 5000,
    SessionTokenTtlMs  = 5 * 60 * 1000,
    AuditRetentionDays = 90,
}

ParameterDefaultDescription
AcePermission'admin'ACE node that opens /hzpanel. See Permissions setup
DevAllowAllfalsetrue lets everyone open the panel, without any check. For a dev server only
RateLimitWrites10Max saves per admin in one window
RateLimitWindowMs5000Length of that window, in ms
SessionTokenTtlMs300000A panel session expires after this long without activity (5 min)
AuditRetentionDays90Not applied in v1.2.0: hz_lib never deletes audit files. Delete old data/_audit.*.log files yourself if you need a retention limit

Access control

HZBridge.Panel.AccessControl = {
    Enabled               = true,
    Resolution            = 'union',
    CapsMemoTtlMs         = 1000,
    ScrapePermissionsCfg  = true,
    PermissionsCfgPath    = 'config/permissions.cfg',
    RestartRequiresManage = false,
    CuratedGroups         = {
        'god', 'owner', 'superadmin', 'admin', 'headadmin', 'sradmin',
        'dev', 'developer', 'mod', 'moderator', 'trialmod', 'support', 'helper',
    },
    RescanCooldownMs      = 30000,
}

Staff roles with access per module. A role is an ACE group (group.admin, group.mod…) or a framework staff group. For each module, a role gets any of three rights:

  • view: read the module's settings
  • config: change its saved settings
  • manage: use its live actions (for example, set the weather now)
A moderator can hold manage on HZ-Weather without config: he runs the weather but cannot change its settings. You edit the roles in game, in /hzpanel > Access control (only a role allowed to edit access sees it).
ParameterDefaultDescription
Enabledtruefalse = no roles: anyone who holds AcePermission gets full access to everything
Resolution'union'Player in several roles. 'union': he gets the rights of all of them. 'highest': only the rights of his highest-ranked role
CapsMemoTtlMs1000How long (ms) a player's rights are cached between two checks. Keep it small
ScrapePermissionsCfgtrueReads your permissions file to list your group names in the role picker. Names only: access is always checked live through ACE. Set false if your host blocks file reads
PermissionsCfgPath'config/permissions.cfg'That file, relative to the server root
RestartRequiresManagefalseRestarting a module from the panel needs config. true also requires manage
CuratedGroups13 common namesGroup names offered in the role picker before they are found on your server. Add your own staff groups
RescanCooldownMs30000Minimum time (ms) between two group scans started from the panel
  • On first boot, the group behind AcePermission (group.admin by default) gets full access and the right to edit access, so nobody is locked out. Framework admin groups (admin, god, superadmin, owner) found at that point get full access to the modules, but not the right to edit access.
  • A player whose groups match no role still gets full access if he holds AcePermission (or the command ACE). A player who matches a role keeps that role's limits.
  • Locked out? Run hzaccess_recover <group> in the server console (for example hzaccess_recover admin): that group gets full access and the right to edit access again.

Auto-restart dependents

HZBridge.AutoRestartDependents = false

Stopping hz_lib also stops every resource that depends on it. With true, those resources are started again once hz_lib is back. Off by default: it would also start dependents you keep stopped on purpose.


Debug

HZBridge.Debug = false

Set to true to enable verbose logging with [HZ Bridge] prefix in the console. Useful for troubleshooting detection issues.


Full Example

HZBridge = {}

HZBridge.Framework     = 'auto'
HZBridge.Inventory     = 'auto'
HZBridge.Notifications = 'auto'
HZBridge.Dispatch      = 'auto'
HZBridge.Target        = 'auto'
HZBridge.Menu          = 'auto'
HZBridge.Banking       = 'auto'

HZBridge.Callback = {
    Timeout   = 15000,
    RateLimit = 50,
}

HZBridge.DispatchRelay = {
    RateLimit         = 5,
    RateLimitWindowMs = 10000,
    MaxTextLength     = 200,
    MaxJobs           = 20,
}

HZBridge.Locale = 'en'

HZBridge.Panel = {
    AcePermission      = 'admin',
    DevAllowAll        = false,
    RateLimitWrites    = 10,
    RateLimitWindowMs  = 5000,
    SessionTokenTtlMs  = 5 * 60 * 1000,
    AuditRetentionDays = 90,
}

HZBridge.Panel.AccessControl = {
    Enabled               = true,
    Resolution            = 'union',
    CapsMemoTtlMs         = 1000,
    ScrapePermissionsCfg  = true,
    PermissionsCfgPath    = 'config/permissions.cfg',
    RestartRequiresManage = false,
    CuratedGroups         = {
        'god', 'owner', 'superadmin', 'admin', 'headadmin', 'sradmin',
        'dev', 'developer', 'mod', 'moderator', 'trialmod', 'support', 'helper',
    },
    RescanCooldownMs      = 30000,
}

HZBridge.AutoRestartDependents = false

HZBridge.Debug = false

Recommendation: Leave detection on 'auto' unless you have a specific reason to override. The auto-detection is reliable and covers all common setups.