Commands
Keybinds, player commands, HUD placement commands, and the admin commands for the inventory, targeting and zones in nx_hud.
Keybinds
Every key below is registered with FiveM, so players can rebind it in Settings, Key Bindings, FiveM. The defaults come from the config files and convars named in the table.
| Default key | Setting | Action |
|---|---|---|
F7 | none | Open the HUD preferences. F7, Esc or Done closes them. |
B | Config.vehicle.seatbelt.key | Buckle or unbuckle the seatbelt. |
Left, Right | Config.vehicle.indicators.keys | Left and right turn signal. Driver only. |
Down | Config.vehicle.indicators.keys | Hazard lights. Driver only. |
G | Compat.radialKey | Open the radial menu. |
X | none | Cancel the current progress bar, when the script allows it. |
F2 | inventory:keys | Open the inventory. |
K | inventory:keys | Open a nearby trunk, dumpster or stash. Off when NxInventory.secondaryKey is false; the glovebox is then in the radial menu. |
TAB | inventory:keys | Show or hide the hotbar. Does nothing while the HUD is hidden. |
1 to 5 | none | Use the item in that hotbar slot. Does nothing while the HUD is hidden. |
R | none | Reload the weapon in hand. |
Left Alt | ox_target:defaultHotkey | Targeting. |
E | none | Use the selected target option. |
Backspace | none | Go back one target menu. |
The seatbelt and indicator keys do nothing while a menu or another page holds the mouse, and the seatbelt key does nothing while a seatbelt script owns the belt.
Player commands
/hudprefseveryoneOpen or close the HUD preferences: vehicle mode, cluster face, glass, units, radar shape and zoom, prompts and progress, the radial menu, interface sounds and targeting. Bound to F7. Choices are saved on the player's PC.
/hudbelteveryoneBuckle or unbuckle nx_hud's own seatbelt. Bound to B. It does nothing when Config.vehicle.seatbelt.enabled is false or a seatbelt script owns the belt.
/hudlefteveryoneLeft turn signal on or off. Bound to the left arrow. hudright and hudhazard work the same way for the right signal (right arrow) and the hazard lights (down arrow).
/stealeveryoneSearch the closest player, when that player can be searched. Turn it off with setr inventory:enablestealcommand false.
/ox_libeveryoneOpen the ox_lib settings, where players choose their language and other lib preferences.
HUD placement
These run on the player's own client. Players with an unusual screen use them to fit the radar, and server staff use them to diagnose the HUD. The F7 preferences cover the everyday choices.
/hud radar <shape>everyoneSwitch the radar shape for this session. The F7 setting is the one that is saved.
Arguments
shapestring— 'square', 'squircle' (Soft in F7), 'circle' (Round in F7) or 'auto'.
/hud radar nudge <dx> <dy>everyoneMove the radar, and the island and gauges with it, by a small amount. Each call adds to the last. /hud radar nudge reset puts it back. Saved for the player.
Arguments
dxnumber— Thousandths of the screen width. Positive moves right.dynumber— Thousandths of the screen height. Positive moves down.
/hud radar nudge 4 -2
/hud radar nudge reset/hud radar edge <state>everyoneOn screens wider than 16:9, 'on' (the default) puts the radar at the left edge of the screen and 'off' keeps it inside the centred 16:9 area. Saved for the player.
Arguments
statestring— 'on' or 'off'.
/hud radar airzoom <state>everyoneWhether the radar widens with altitude in helicopters and planes. On by default. Lasts for this session.
Arguments
statestring— 'on' or 'off'.
/hud diageveryoneCheck the radar's placement for 12 seconds. A red outline marks where the radar should be and a cyan one where the HUD drew it; both should sit on the map. The resolution, aspect ratio, safe zone and the radar's position are printed to F8.
/hud ws [state]everyoneThe windscreen HUD in first person. On by default. Lasts for this session.
Arguments
state?string— 'on' or 'off'. Leave it out to switch.
/hud bridgeeveryonePrint to F8 which framework, fuel and seatbelt adapters the HUD reads, the current status values, and the fuel of the vehicle you are in.
Inventory admin commands
These are ox_inventory's admin commands, with the same names and
arguments. The commands marked group.admin are open to that group by
default; grant other groups the matching command.<name> ACE.
/additem <target> <item> [count] [type]group.adminGive an item to a player. Also available as giveitem.
Arguments
targetplayer id— The player to receive the item.itemstring— The item name.count?number— Defaults to 1.type?string— Sets the item's "type" metadata.
/removeitem <target> <item> [count] [type]group.adminTake an item from a player.
Arguments
targetplayer id— The player to take the item from.itemstring— The item name.count?number— Defaults to 1. Takes what the player has when they hold fewer.type?string— Only items with this "type" metadata.
/setitem <target> <item> [count] [type]group.adminSet how many of an item a player has, adding or removing as needed.
Arguments
targetplayer id— The player.itemstring— The item name.count?number— Defaults to 0.type?string— Only items with this "type" metadata.
/takeinv <target>group.adminConfiscate a player's inventory, to give back later with restoreinv.
Arguments
targetplayer id— The player.
/restoreinv <target>group.adminGive back an inventory confiscated with takeinv. Also available as returninv.
Arguments
targetplayer id— The player.
/clearinv <invId>group.adminDelete every item in an inventory.
Arguments
invIdstring— The inventory id, a player id, or 'me'.
/saveinv [lock]group.adminSave every pending inventory change to the database now.
Arguments
lock?string— 'true' keeps the inventory locked after the save, until a restart or a save without it.
/viewinv <invId>group.adminLook inside an inventory without being able to move anything.
Arguments
invIdstring— The inventory id or a player id.
/clearevidence <locker>police boss gradeEmpty a police evidence locker. Only a police player whose grade the framework counts as boss can use it.
Arguments
lockernumber— The evidence locker id.
/convertinventory <kind>server console or command.convertinventory ACEConvert old ESX inventories into ox_inventory's format, as ox_inventory's command of the same name does. Back up the database first.
Arguments
kindstring— 'esx' (player inventories in the old ESX format), 'esxproperty' (ESX property storage) or 'linden' (trunks and gloveboxes from linden_inventory).
/clearActiveIdentifier <identifier>server consoleFree a character that is stuck as already active: saves its inventory and kicks the player holding it.
Arguments
identifierstring— The character identifier.
nxinv
nxinv adds inventory tools of its own. It runs in the server console,
or in game for a player with the command.nxinv ACE. nxinv help lists
the subcommands.
/nxinv status [detail]console or command.nxinvWhether the inventory is active and why not when it is off, the framework and its bridge, player and drop sizes, and which ox_inventory dependants have attached.
Arguments
detail?string— 'exports', 'events' or 'all' for the long version.
/nxinv bridgeconsole or command.nxinvThe selected framework bridge, whether it is attached, the framework's version, and the bridges installed.
/nxinv saveconsole or command.nxinvWrite every changed inventory to the database now, like saveinv but without closing anything.
/nxinv exploitsconsole or command.nxinvPer-player counts of refused, suspicious requests this session.
/nxinv orphans [restore] [limit]console or command.nxinvItems set aside because data/items.lua no longer defines them (NxInventory.orphans). Add the item back to data/items.lua, restart, then restore.
Arguments
restore?string— 'restore' puts back every orphan whose item exists again.limit?number— How many to list. Defaults to 50.
/nxinv trace <state>console or command.nxinvLog every ox_inventory call by the resource that made it. Useful to find which script misbehaves.
Arguments
statestring— 'on' or 'off'.
/nxinv migrate [action] [from=<path>] [to=<path>] [scan=<path>] [all] [force] [dry]server consoleMove a server from ox_inventory to nx_hud. check prints a preflight table and ends with PREFLIGHT: GO or NO-GO, and writes nothing. apply copies your data files into nx_hud/data/ and the images your items use into nx_hud/web/images/, then validates what it wrote. esx-items writes the ESX items table's extra rows into data/items.lua. It reads the old folder and never changes it.
Arguments
action?string— 'check' (the default), 'apply', 'esx-items' or 'help'.from=<path>?string— The full path of your old ox_inventory folder. Without it, the installed ox_inventory resource is read.to=<path>?string— apply: write into this folder instead of nx_hud.scan=<path>?string— check: scan every resource under this folder instead of the started ones.all?flag— apply: copy every image, also the ones no item uses.force?flag— apply: copy images even when NxInventory.fileBudget says no.dry?flag— apply and esx-items: show the plan and write nothing.
nxinv migrate check from=C:/txData/server/resources/[ox]/ox_inventory
nxinv migrate apply from=C:/txData/server/resources/[ox]/ox_inventorynxtarget
/nxtarget status [detail]console or command.nxtargetWhether targeting is active and why not when it is off, and how many options each resource has registered. In a player's F8 it prints that player's own client.
Arguments
detail?string— 'exports' or 'all' for the long version.
/nxtarget trace <state>console or command.nxtargetLog every target export call by the resource that made it.
Arguments
statestring— 'on' or 'off'.
Zone creator
/zone <zoneType> [useLast]command.zone ACEDraw a zone in the world, as ox_lib's zone creator does. The zone starts where you stand; the on-screen prompt lists the keys for moving, sizing, turning and placing poly points. Enter asks for a name and a format (function, array or target) and saves it. Esc cancels. Saved zones are appended to created_zones.lua in the nx_hud folder.
Arguments
zoneTypestring— 'box', 'sphere' or 'poly'.useLast?string— Start from the size and heading of the last box or sphere you saved this session.
# server.cfg
add_ace group.admin command.zone allowExports
The nx_hud API for other resources. HUD visibility, status, fuel, seatbelt and ammo readers, player settings, inventory gates and item effects, worn gear, payment methods, shop prices, crafting benches, combine recipes and the new hook events.
Events
The events and state bags nx_hud adds for other resources, next to the ox_lib, ox_inventory and ox_target events it keeps. Worn gear, player settings, armour plates and inventory weights.