NX Target
Liquid-glass target with an in-game look editor (/nxtarget), a real qb-target drop-in and adapters to ox_target / qb-target / qtarget, plus a self raycast engine. QBCore / Qbox / ESX. Resource: nx-target.
Installation
nx-target folder in resources/, after ox_lib and oxmysql. Its tables (nx_target_entries, nx_target_settings) are created automatically.
ensure oxmysql
ensure ox_lib
ensure nx-targetGive the owner/admin ACE, then open the editor with /nxtarget:
add_ace group.admin nx-target.owner allow
add_ace group.admin command.nxtarget allowDo not load nx-target in self mode alongside the real qb-target / qtarget / ox_target: only one resource can own the target namespace.
Features
- In-game liquid-glass look editor (
/nxtarget): icon, shape, layout, colors, glow, animations, opacity, live preview. - qb-target drop-in: registers the full qb-target/qtarget API so existing resources work unchanged.
- Adapters (
Config.Adapter): self, or pass through to ox_target / qb-target / qtarget. - Server-side permissions (ACE, job/gang, items) and flexible actions (event/export/command).
- SQL persistence with JSON backup; validated PNG icon upload.
How targets are defined
As in qb-target / ox_target, zones are defined in code, not from the UI. The /nxtarget editor changes the look only.
- From your resources via the standard exports (
exports['nx-target']:AddBoxZone(...),AddTargetModel(...)). - With
AddLocalEntity/RemoveLocalEntityat runtime. - Or by seeding
nx_target_entries(SQL) /data/targets.json.
Configuration
Edit config/config.lua:
| Option | Description |
|---|---|
| Config.Locale | Language 'en' / 'es' (locales/*.json) |
| Config.TargetKey | Target key |
| Config.Adapter | 'self' / 'auto' / 'ox' / 'qb' / 'qtarget' |
| Config.ProvideCompat | Register qb-target/qtarget exports (default true) |
| Config.AceList / uploads | Admin ACE and PNG upload settings |
| default style | Full default look of the target |
Adapters
Config.Adapter = 'self' uses the built-in liquid-glass engine (recommended as a qb-target replacement). 'auto' tries ox_target, then qb-target, then qtarget, then self.
Common errors
- Targets don't appear -> zones are defined by exports/SQL, not from the menu; make sure your resources register them and nx-target is ensured first.
- Exports clash with another target -> set
Config.ProvideCompat = falseif you run a different target underneath. - A freshly uploaded PNG isn't visible -> restart nx-target so FiveM re-serves the dynamic NUI files.
- SQL didn't create tables -> it falls back to JSON in
data/; check that oxmysql is running.