Convars
Every convar read by ox_target in the 1.17.2 archive — values, defaults, server.cfg examples, priority over Config.UI.vignette and effects on outline and closing.
Goal: set the key, the open mode, the click, the outline and the vignette.
File: server.cfg.
Full list
This list comes from every GetConvar / GetConvarInt read in the archive, not only from the README (which mentions eight of them).
| Convar | Values | Default | Effect |
|---|---|---|---|
ox_target:defaultHotkey | key name | LMENU | Default keyboard key of the ox_target keybind (lib.addKeybind). FiveM stores each player’s binding: the value only applies to players who have not customised it yet. Read by: client/main.lua |
ox_target:toggleHotkey | 0 | 1 | 0 | 1: one press opens, another closes. Any other value: hold the key. Read by: client/main.lua |
ox_target:leftClick | 0 | 1 | 1 | 1: left click locks the menu on the target; otherwise right click. Right click unlocks. Read by: client/main.lua |
ox_target:centerCursor | 0 | 1 | 1 | 1: the cursor is moved back to the screen centre on every opening. Read by: client/main.lua |
ox_target:closeOnSelect | 0 | 1 | 1 | 1: targeting closes after an option that does not open a submenu. Read by: client/main.lua |
ox_target:drawOutline | 0 | 1 | 1 | 1: outline on entities with specific options (model, networked or local entity), never on peds. Read by: client/main.lua |
ox_target:outlineColor | R,G,B,A | 255,255,255,255 | Four R,G,B,A integers separated by commas; an unreadable component becomes 255. Read by: client/main.lua |
ox_target:outlineDistance | integer | 5 | Only used when the largest distance of the entity’s specific options is 0. With this archive, generated options always have a distance: this convar only matters if you give them distance = 0. Read by: client/main.lua |
ox_target:vignette | -1 | 0 | 1 | -1 | Unset (-1): Config.UI.vignette decides. 1: vignette shown. Any other value: vignette hidden. Read by: client/state.lua |
ox_target:defaults | 0 | 1 | 1 | 1: loads the ox_target door / hood / trunk options, unless Config.Features.vehicleDoors = false. Read by: client/defaults.lua |
ox_target:drawSprite | integer | 24 | Maximum number of zone dots drawn per frame; 0 disables them. Read by: client/utils.lua |
ox_target:debug | 0 | 1 | 0 | 1: aim marker and demo options (zones near the police station, police model, globals). Read by: client/main.lua, client/debug.lua |
How to set them
Convars are read client side when the script starts: declare them with setr (convar replicated to clients), before ensure ox_target.
setr ox_target:defaultHotkey LMENU
setr ox_target:toggleHotkey 0
setr ox_target:leftClick 1
setr ox_target:centerCursor 1
setr ox_target:closeOnSelect 1
setr ox_target:drawOutline 1
setr ox_target:outlineColor 140,180,215,255
setr ox_target:vignette 1
ensure ox_target
Boolean values are read with GetConvarInt: write 0 or 1, not true / false. For most of them, only 1 enables the option (toggleHotkey, debug), or conversely anything other than 1 disables it (leftClick, centerCursor, closeOnSelect, drawOutline, defaults).
After a change: restart the server, or run the setr line in the console then restart ox_target.
Vignette priority
ox_target:vignette is read with a default of -1:
- convar absent (
-1):Config.UI.vignettedecides; - convar set to
1: vignette shown, whateverConfig.UI.vignettesays; - convar set to any other value (
0…): vignette hidden.
Default key
ox_target:defaultHotkey is the key proposed by default for the “ox_target” FiveM key mapping. FiveM remembers each player’s mappings: a player who already has the mapping keeps their key, and can change it in Settings › Key Bindings › FiveM.
Outline and outline distance
The outline only appears on an entity that has specific options (model, networked entity or local entity options), never on peds or players, and never for global options alone (all vehicles, all objects). The distance used is the largest distance among those options. ox_target:outlineDistance is only used when that value is 0: with this archive, generated options always have a distance, so this convar only has an effect if you give them distance = 0.
Closing after selection
With closeOnSelect set to 1, targeting closes after an option that does not open a submenu. Categories keep the menu open. Checkboxes do not go through this closing: the menu stays open after clicking a checkbox.
Common mistakes
setinstead ofsetr: the convar is not visible client side, the default value applies.setr ox_target:toggleHotkey true:trueis not an integer; the value read is not1and toggle mode stays off.- Outline colour with spaces:
setr ox_target:outlineColor 140, 180, 215, 255only passes the first word (140,); missing components are255. Write140,180,215,255.