NullSect
Systems nominal

Docs / Target / Installation

Installation — ns-target

ns-target replaces ox_target / qb-target / qtarget. The real resources must not run next to it: both would answer the same exports.

  1. Remove the old target resource. Delete (or move out of resources/) the folders ox_target, qb-target and qtarget you have. Keep your ensure ox_target line in server.cfg, the shim will use it.
  2. Add ns-target. Copy the ns-target folder into resources/ (any category folder works, e.g. [nullsect]).
  3. Add the shims you need. They are empty resources with the old names, so scripts that check GetResourceState('ox_target') or declare dependency 'ox_target' keep working. Copy them out of ns-target/compat/ next to ns-target:
    ShimCopy it when
    compat/ox_targetalways (ox_inventory, ox_doorlock, Qbox scripts, NullSect scripts look for it)
    compat/qb-targetyou run scripts made for qb-target
    compat/qtargetyou run old scripts that look for qtarget
  4. server.cfg order. ns-target after ox_lib and the framework, shims after ns-target, everything that adds targets after the shims:
    ensure ox_lib
    ensure qbx_core
    ensure ns-target
    ensure ox_target     # shim
    ensure qb-target     # shim (optional)
    # ... ox_inventory, ox_doorlock, your scripts
    
  5. Restart the server (not only the resource: other scripts register their targets when they start).

Verify

  1. The F8 console shows no ns-target error. ox_target is running, so ns-target stays inactive ... means the real ox_target is still installed: ns-target then does nothing at all (no key, no exports) so the two never fight.
  2. In game hold Left Alt next to an ATM or a shop counter: diamonds appear, the aimed one gets a frame and a menu.
  3. Left click, pick an option: the same thing happens as with ox_target.
  4. Press 1 while aiming at something with options: the first option runs.

Troubleshooting

ProblemFix
A script says "ox_target not found" / its targets never showCopy compat/ox_target next to ns-target and ensure it after ns-target.
qb-target scripts do nothingCopy compat/qb-target and ensure it after ns-target.
F8: X is running, so ns-target stays inactiveThe real X is still in resources/. Remove it, copy the shim and restart the server.
Targets are gone after restart ns-targetSame as ox_target: options live in memory. Restart the server (or the scripts that add targets).
No diamondsConfig.Markers.enabled; markers only show for things with an option you can use, in Config.Markers.distance.
Players want another keySettings > Key Bindings > FiveM > "Target". The default is Config.Hotkey.key.

Cart

Your cart is empty.