Configuration — ns-target
Everything is in config.lua (not escrowed). Restart the server after a change.
| Key | Default | What it does |
|---|---|---|
Config.Framework | 'auto' | 'auto', 'qbox', 'qbcore', 'esx', 'standalone': used for groups, items and qb-target filters |
Config.Locale | 'en' | 'en' or 'tr' (add locales/<code>.lua for more) |
Config.Debug | false | debug logs and the /nstargetdebug command (prints registry counts to F8) |
Config.Compat.ox_target / qtarget / ['qb-target'] | true | answer that API. Turn one off only if a real resource of that name must keep running |
Key
| Key | Default | What it does |
|---|---|---|
Config.Hotkey.key | 'LMENU' | default key (Left Alt). Players can rebind it in Settings > Key Bindings > FiveM |
Config.Hotkey.toggle | false | true: press once to open, again to close (instead of holding) |
Config.Hotkey.leftClick | true | the mouse button that puts the cursor on the menu (false = right mouse) |
Config.Hotkey.numberKeys | true | 1-9 pick an option |
In hold mode, releasing the key closes targeting, unless the cursor is on the menu: then it stays open until you pick an option, right click, press ESC or walk out of reach.
Markers
| Key | Default | What it does |
|---|---|---|
Config.Markers.enabled | true | diamonds on nearby interactable spots while the key is held |
Config.Markers.distance | 12.0 | metres from the player |
Config.Markers.labelDistance | 4.0 | the name shows inside this distance |
Config.Markers.maxMarkers | 24 | most markers at once (GTA allows 32 per frame) |
Config.Markers.maxLabels | 6 | most names at once |
Config.Markers.scanInterval | 500 | ms between two searches for nearby targets |
Config.Markers.checkCanInteract | true | hide a marker when none of its options would show (calls the scripts' canInteract) |
Config.Markers.lineOfSight | true | hide markers behind walls |
Config.Markers.skipVehicles | true | vehicles never get a marker (their options still open when aimed at) |
Global options for every ped / vehicle / object / player are never marked.
Look
| Key | Default | What it does |
|---|---|---|
Config.Theme.accent | '#f5b301' | frame, line, keys, selected row |
Config.Theme.markerColor | { 245, 179, 1, 200 } | diamonds within labelDistance and the aimed one (r, g, b, alpha) |
Config.Theme.markerIdleColor | { 230, 230, 230, 150 } | diamonds further away |
Config.Theme.markerSize | 0.012 | diamond size (fraction of the screen width) |
Other
| Key | Default | What it does |
|---|---|---|
Config.Ray.distance | 20.0 | metres the aim ray reaches from the camera (each option still has its own distance) |
Config.Defaults.vehicleDoors | true | door / bonnet / boot options on every vehicle, like ox_target |
Config.Defaults.doorDistance | 6.0 | server check: max metres between a player and another player's vehicle whose door is toggled |
Config.Security | rate limits of the two server requests (entity tagging, door toggle) |
Model names
data/names.lua maps model names to locale keys. Add a line and the text in every locale file:
-- data/names.lua
prop_my_safe = 'name_safe',
-- locales/en.lua
name_safe = 'Safe',
For script authors: title
Any option, ox_target zone data or qb-target targetoptions table may carry title = 'Fleeca ATM'. ns-target shows it
as the marker name and the menu header. ox_target and qb-target ignore the field, so the script stays compatible.
exports.ox_target:addBoxZone({
coords = vec3(147.6, -1035.8, 29.3), size = vec3(1, 1, 2), -- example
title = 'Fleeca ATM',
options = { { name = 'atm', label = 'Use ATM', icon = 'fa-solid fa-credit-card', onSelect = openAtm } },
})