Skip to content
FIVECRATE
Frameworks intermediate

How to Install ox_target and Replace qb-target in FiveM

Install ox_target on Qbox, ESX or a standalone FiveM server: ox_lib, start order, convars, and how to move scripts off qb-target, which it no longer emulates.

A roleplay character faces a workshop door with a small targeting marker and wordless interaction icons beside the handle
Author: FiveCrate
Published:
Updated:
Read time: 16 min
Applies to
FiveM Legacy and FiveM for GTAV Enhanced servers; ox_target 1.18.1 (April 25, 2026) with ox_lib 3.30.0 or newer (latest 3.42.2, November 7, 2026); Qbox (qbx_core 1.24.1), ESX Legacy 1.16.4, ox_core, ND Core and servers without a framework; qb-target 5.5.0 for comparison
Last verified

Direct Answer

To install ox_target, start ox_lib first, download ox_target.zip from the latest release on GitHub, extract it to your resources folder as ox_target, and add ensure ox_target to server.cfg after ox_lib and your framework (qbx_core, es_extended, ox_core) but before the scripts that use it. Set its options with setr convars, then restart. ox_target is not a drop-in for qb-target: since version 1.17.0 (August 17, 2024) it only answers the older qtarget exports, so every script that calls exports['qb-target'] must be switched to its ox_target or qtarget option first.

What ox_target is

ox_target is Overextended’s “third-eye” resource. Its documentation describes it as “a performant and flexible standalone targeting resource”, with extra features for ox_inventory, ox_core, qbx_core and es_extended. A player holds a key, looks at a vehicle, ped, object or zone, and picks an action from a small menu instead of walking into a marker.

Three resources share this family tree, and it explains every compatibility question:

  • qtarget came first. Overextended’s release post calls ox_target “the successor to qtarget, focused on improving functionality and performance at the cost of compatibility”.
  • qb-target is QBCore’s target resource. Its README says it “is pretty much a fork of” qtarget.
  • ox_target keeps “partial compatibility for qtarget”, in the words of its README, and nothing more.

ox_target has one hard dependency, ox_lib. Frameworks are optional: the docs say they “aren’t necessary to run ox_target, but they will add additional features”. That makes it usable on every kind of server, from a roleplay city to a racing, drift or PvP server with no framework at all.

ox_target compared with qb-target

ox_targetqb-target
Current version1.18.1, released April 25, 20265.5.0 in its fxmanifest.lua (last commit August 24, 2026)
Required resourceox_libPolyZone
Framework featuresox_core, ESX, Qbox, ND CoreQBCore, as an optional dependency
Settingssetr ox_target:... convars in server.cfgconfig.lua inside the resource
Default keyLMENU (Left Alt)LMENU (Left Alt)
Default reach7 when an option sets no distanceConfig.MaxDistance = 7.0
Exports it answersox_target and qtargetqb-target

QBCore’s own documentation now presents it as a framework for Mantle and says “QBCore has withdrawn from other platforms”. Its FiveM repositories, qb-target included, moved from the qbcore-framework organization to qbcore-fivem on GitHub, and the old addresses redirect there. The framework comparison covers what that means for a server.

What you need before you install ox_target

RequirementMinimumWhy
ox_lib3.30.0Checked by ox_target’s client and server scripts at start
qbx_core (Qbox only)1.18.0Checked before ox_target loads its Qbox group checks
A frameworkNoneESX, Qbox, ox_core or ND Core only add job, gang and item checks

ox_lib’s latest release was v3.42.2, published November 7, 2026. If it is not on your server yet, set it up with the ox_lib installation guide first. ox_lib’s source code now lives in the overextended/ox repository on GitHub. Its README still links the same ox_lib.zip release download that the Qbox and ESX recipes use.

How to install ox_target step by step

  1. Download the release zip. The README’s download link is https://github.com/overextended/ox_target/releases/latest/download/ox_target.zip. The release workflow packs the client, server, web and locales folders with fxmanifest.lua into one folder named ox_target inside that zip.

  2. Extract it into your resources folder. Keep the folder name ox_target: scripts call its functions as exports.ox_target:.... A category folder in square brackets, such as resources/[ox] in the Qbox recipe, is fine.

  3. Start it in the right place. ox_inventory’s documentation gives the order the Overextended resources expect, with your framework’s resource name in place of framework:

    start oxmysql # this should be one of the first resources
    start ox_lib
    start framework # the name of your framework (i.e. ox_core, es_extended, qbx_core)
    start ox_target
    start ox_inventory

    ensure works the same way in a fresh start: it “Restarts the resource specified in the argument, if it was started. If it wasn’t, starts the resource specified in the argument.” Leave out lines for resources you do not run. Scripts that use ox_target start after it.

  4. Add the convars. ox_target reads its settings from convars, set with setr (see the reference table below). The Qbox recipe loads them from ox.cfg before its ensure lines; do the same.

  5. Restart the server and read the console. If ox_lib is missing or too old, ox_target says so (see Troubleshooting). When a newer release exists, ox_lib’s version check prints An update is available for ox_target with the current version and a link.

  6. Check it in game. Hold Left Alt and look at a vehicle door: with the default options on, ox_target offers Toggle front driver door, Toggle hood, Toggle trunk and the other doors.

Installing ox_target on Qbox

The Qbox recipe already installs it. Its qbox.yaml downloads ox_target.zip from the latest release and unzips it into resources/[ox], and its server.cfg starts the resources in this order:

ensure ox_lib
ensure qbx_core
ensure ox_target
ensure [ox]

The convars live in a separate ox.cfg, loaded by exec ox.cfg, under the heading ### OX TARGET ###. Edit them there. For groups, ox_target asks qbx_core through its HasGroup export, so a groups = 'police' option follows the player’s groups in Qbox. The docs note that groups “may refer to jobs, gangs, etc.”

How to install ox_target on ESX

The ESX Legacy recipe downloads oxmysql.zip and ox_lib.zip, but no target resource, so ESX servers always add ox_target by hand. Its server.cfg starts ensure oxmysql, ensure esx_lib, ensure es_extended, then ensure [core], ensure [standalone] and ensure [esx_addons], and the recipe unzips ox_lib into [standalone]. Put the ox_target folder directly in resources, outside those bracket folders, and add ensure ox_target directly below ensure [standalone]: at that point es_extended and ox_lib have both started, and the add-ons in [esx_addons] start after ox_target.

ox_target detects ESX when the es_extended export getSharedObject exists. It then checks groups against the player’s job and, where a script sets one, job2, with the grade for the { police = 2 } form. Items come from ox_inventory when it runs, otherwise from the ESX inventory data.

ox_target on a server without a framework

On a FiveM Basic Server, a vMenu server, a racing, drift or PvP server, ox_target runs on ox_lib alone. You get the vehicle door, hood and trunk options and every option your scripts register. Two framework-based checks behave differently:

  • groups: with no supported framework, ox_target keeps its built-in group check, which always returns true. A job-locked option is shown to everyone.
  • items: if ox_inventory runs, ox_target counts the player’s items through it on any server. Without it, item-locked options stay hidden.

Can you use ox_target on QBCore?

Not with QBCore’s job, gang or item data. Version 1.17.0, released August 17, 2024, deleted both client/framework/qb.lua and client/compat/qb-target.lua, and took provide 'qb-target' out of the manifest. ox_target now looks only for ox_core, es_extended, qbx_core and ND_Core. On a plain QBCore server, every groups option is therefore visible to all players, which matters for police, EMS and gang interactions. A script you control can still run its own check through the option’s canInteract function. For job and gang checks built into ox_target, the server needs a framework ox_target supports, such as Qbox, whose qbx_core stands in for qb-core so QBCore scripts keep working. The QBCore to Qbox migration guide covers that move.

ox_target convars and defaults

The docs list these lines. The default is the value ox_target’s code uses when a convar is not set.

setr ox_target:toggleHotkey 0
setr ox_target:defaultHotkey LMENU
setr ox_target:drawSprite 1
setr ox_target:defaults 1
setr ox_target:debug 0
setr ox_target:leftClick 1
ConvarWhat it doesDefault in code
ox_target:toggleHotkey1: press the key once to open and again to close, instead of holding it0
ox_target:defaultHotkeyKey that opens targeting, as an input mapper nameLMENU (Left Alt)
ox_target:drawSpriteCircles drawn at zone centres24
ox_target:defaultsBuilt-in options such as vehicle doors1
ox_target:debugTest zones and options, entity outlines and a raycast marker0
ox_target:leftClick1: select options with the left mouse button1

Use setr, not set. ox_target reads these values in client scripts, and the Cfx.re docs say “standard convars can only be used in server-side scripts”. A replicated convar, set with setr, “will be available on the client side”.

The docs and the source describe drawSprite differently. The docs’ comment reads “Draw a sprite (circle) at the centroid of a zone”. In the code, the value is a limit on how many zone sprites are drawn, with the note “SetDrawOrigin is limited to 32 calls per frame. Set as 0 to disable.” Use 0 to turn the circles off; a sample value of 1 keeps the number of circles low rather than simply switching them on.

Changing the ox_target key

ox_target:defaultHotkey takes a name from the Cfx.re keyboard list, where LMENU is Left Alt and RMENU Right Alt. ox_target registers the key through ox_lib’s keybind module, which calls FiveM’s RegisterKeyMapping with the description Toggle targeting. ox_lib’s documentation warns about the default key: “Changing this will not change the key for existing players”. A new value only reaches players who never had the binding; everyone else keeps the key already stored for Toggle targeting and changes it in their own key settings.

Testing with debug mode

setr ox_target:debug 1 adds test targets: a box zone, a sphere zone, an option on the police vehicle model, and global options on peds, vehicles and objects. Selecting one prints the target data as JSON. Turn it back to 0 before players join.

How to replace qb-target with ox_target

Removing qb-target and adding ox_target is the easy part. The work is in the scripts. ox_target’s manifest contains provide 'qtarget', and the Cfx.re manifest reference says a resource with provide “will act as if it is said resource if started”. There is no provide 'qb-target' any more, so nothing answers exports['qb-target']. Qbox’s documentation sums it up: such calls “Fail. ox_target only answers the older qtarget exports.”

The usual messages are Could not find dependency qb-target for resource my_script. when a script lists qb-target in its manifest, and No such export ... in resource qb-target when it calls an export.

  1. Find every script that uses qb-target. Search your resources folder for qb-target, in Lua files and in each fxmanifest.lua. Qbox’s script checklist does the same search.

  2. Switch the script’s config first. Many scripts have a target setting. Qbox’s advice: “Switch it to ox_target in its config. Some scripts support qtarget, which ox_target also answers”. The qtarget route is a fallback: ox_inventory’s docs already call qtarget deprecated.

  3. Escrowed scripts. A script with a .fxap file is escrowed, and “You can only change its config”. Without an ox_target or qtarget option, ask its author for an updated version.

  4. Scripts you can edit. Replace the qb-target calls with ox_target exports, using the tables below. A developer can do this for scripts you did not write.

  5. Remove qb-target from server.cfg once nothing calls it. qb-target is the resource that needs PolyZone; ox_target finds its zones through ox_lib’s lib.zones. Keep PolyZone only if another resource lists it as a dependency.

  6. Restart and test every interaction, including job-locked ones, with a player who does not have the job.

qb-target exports and their ox_target counterparts

The ox_target column follows ox_target’s own qtarget compatibility code. qb-target kept qtarget’s names for zones, bones, entities and models. For global options it did not: qtarget’s handlers are named Ped, Vehicle, Object and Player (and RemovePed and so on), where qb-target uses AddGlobalPed and RemoveGlobalPed. Those rows come from ox_target’s function list.

qb-target exportox_target export
AddBoxZoneaddBoxZone
AddPolyZoneaddPolyZone
AddCircleZoneaddSphereZone
RemoveZoneremoveZone (takes the zone id or its name)
AddTargetEntityaddEntity with network ids (NetworkGetNetworkIdFromEntity), or addLocalEntity with entity handles
RemoveTargetEntityremoveEntity or removeLocalEntity
AddTargetModel / RemoveTargetModeladdModel / removeModel
AddTargetBoneaddGlobalVehicle with bones on each option
AddGlobalPed, AddGlobalVehicle, AddGlobalObject, AddGlobalPlayeraddGlobalPed, addGlobalVehicle, addGlobalObject, addGlobalPlayer
RemoveGlobalPed, RemoveGlobalVehicle, RemoveGlobalObject, RemoveGlobalPlayerremoveGlobalPed, removeGlobalVehicle, removeGlobalObject, removeGlobalPlayer

qb-target removes options by their label; ox_target removes them by name. The compatibility code copies label into name when an option has none, so do the same in a rewrite.

qb-target also exports AddComboZone, AddEntityZone, RemoveTargetBone, AddGlobalType, RemoveGlobalType and a set of Get...Data and Update...Data functions. ox_target’s compatibility code has no handler for any of them, so those calls need rewriting by hand.

How the option fields change

ox_target’s compatibility code converts each qtarget option like this. The same renames apply when you rewrite a qb-target option.

qb-target / qtarget fieldox_target field
actiononSelect
jobgroups
item or required_itemitems
event with type = "server"serverEvent
event with type = "command"command
event with type = "client"event
distance on the options tabledistance on each option

ox_target’s zone exports take one table with coords, size (box), radius (sphere) or points (poly), rotation and options, where qb-target uses separate arguments plus minZ, maxZ and heading. Here is qb-target’s own example of a box zone:

exports['qb-target']:AddBoxZone("MissionRowDutyClipboard", vector3(441.7989, -982.0529, 30.67834), 0.45, 0.35, {
  name = "MissionRowDutyClipboard",
  heading = 11.0,
  debugPoly = false,
  minZ = 30.77834,
  maxZ = 30.87834,
}, {
  options = {
    {
      type = "client",
      event = "qb-policejob:ToggleDuty",
      icon = "fas fa-sign-in-alt",
      label = "Sign In",
      job = "police",
      excludejob = 'ambulance', -- this would exclude ambulance job from seeing this target exact opposite of feature above
      excludegang = 'ballas', -- this would exclude ballas gang from seeing this target
    },
  },
  distance = 2.5
})

And here is a box zone in ox_target’s format, from its client/debug.lua:

ox_target:addBoxZone({
  coords = vec3(442.5363, -1017.666, 28.85637),
  size = vec3(3, 3, 3),
  rotation = 45,
  debug = drawZones,
  drawSprite = true,
  options = {
    {
      name = 'debug_box',
      event = 'ox_target:debug',
      icon = 'fa-solid fa-cube',
      label = locale('debug_box'),
    }
  }
})

excludejob and excludegang have no counterpart in the conversion; a canInteract function on the option covers checks like these. Give every option a name: ox_target uses it to remove options, and when the same resource registers a second option with that name on the same target, it replaces the first.

Does ox_target work on FiveM for GTAV Enhanced?

ox_target’s README and docs do not mention Enhanced as of December 3, 2026. What the sources show:

  • Recipes. The Enhanced recipe list, indexv5.json, includes Qbox, and the Qbox recipe installs ox_target.
  • NUI callbacks. On Enhanced, “All resources now have nui_callback_strict_mode enabled by default”. ox_target 1.18.1 already sets nui_callback_strict_mode 'true' in its manifest.
  • ox_lib. ox_lib v3.42.0, released November 1, 2026, fixed “a bug that affected FiveM Enhanced” in cfxlua-require. Run 3.42.0 or newer on Enhanced.

Test interactions on an Enhanced test server before players rely on them.

Troubleshooting

“ox_lib must be started before this resource.”

ox_lib is not running when ox_target starts. Check that the ox_lib folder exists, that ensure ox_lib comes before ensure ox_target, and that ox_lib itself started without errors.

“ox_target requires version ‘3.30.0’ of ‘ox_lib’”

The full line ends with (current version: ...). ox_lib is older than 3.30.0, so ox_target stops. Replace the ox_lib folder with the latest release zip and restart. On Qbox, a similar line naming qbx_core and 1.18.0 means qbx_core is too old for ox_target’s group checks.

“Could not find dependency qb-target for resource …”

A script lists qb-target in its fxmanifest.lua, and ox_target does not provide that name. Switch the script to its ox_target option, or use a version from its author. The couldn’t start resource guide explains dependency errors in general.

“No such export AddBoxZone in resource qb-target”

The script calls exports['qb-target'] at runtime. FiveM resolves an export through the resource name, and no running resource registers qb-target’s exports. Change the script’s target option, or rewrite the calls with the tables above. The No such export guide covers the error itself.

Job-locked target options show for every player

ox_target found no supported framework, so its group check returns true. This happens on QBCore. On ESX or Qbox it can also happen when the framework is not running under its usual name or starts after ox_target, because ox_target looks for the framework’s export once, when it starts. On Qbox, a qbx_core older than 1.18.0 has the same effect. Start the framework before ox_target and keep the resource names es_extended or qbx_core.

ox_target does not open

Targeting does not start while the game’s pause menu is open, while another screen has NUI focus, or while a script has called disableTargeting(true), and it closes at once while an ox_lib progress bar is running. Close the other screen first. If only some players are affected, they may have bound Toggle targeting to another key.

Changing ox_target:defaultHotkey did nothing

The new default only applies to players who never had the binding. Existing players change Toggle targeting in their own key settings. Also check that the line uses setr.

“Replacing existing target option ’…’.”

One resource registered two options with the same name on the same target, so the later one replaced the first. Give each option its own name.

Next Steps

Official documentation and repository references