Interaction · QBCore Framework

qb-target

QBCore's third-eye targeting system, and the export signature a very large number of existing scripts are written against.

qb-target is the reason a QBCore server lets you look at a shop counter and press a key instead of standing in a marker. It builds on PolyZone for its zone shapes and registers interactions against models, entities, bones and zones. Newer servers move to ox_target, but qb-target's exports are baked into so many published scripts that it remains one of the most installed resources in FiveM.

Official documentation Repository All resources

At a glance

MaintainerQBCore Framework
Latest releaseRolling — no tagged releases
Last code change2026-08-24
LicenceGPL-3.0
Written inLua
GitHub stars109
StatusActive

Figures read from the repository on 2026-09-22.

Why servers run it

  • Almost every QBCore script released between 2021 and 2024 calls its exports directly.
  • Bone targeting means you can put an option on a vehicle's boot rather than on the whole car.
  • Job and item gating is built into the option table.

Installing qb-target

  1. 1. Install PolyZone first

    qb-target's zone shapes come from PolyZone. Start PolyZone, then qb-target.

  2. 2. Start it before your scripts

    Resources register their targets at start, so the target system has to be up first.

  3. 3. Pick one targeting resource

    Running qb-target and ox_target together gives the player two competing eyes.

  4. 4. Tune the config

    config.lua controls the key, the draw distance and whether the eye is held or toggled.

Working examples

A police armoury on a model

exports['qb-target']:AddTargetModel({ 'prop_gun_rack_01' }, {
    options = {
        {
            type = 'client',
            event = 'police:client:openArmoury',
            icon = 'fas fa-gun',
            label = 'Open armoury',
            job = 'police',
        },
    },
    distance = 2.0,
})

A zone on a map location

exports['qb-target']:AddBoxZone('impound', vector3(409.0, -1622.0, 29.3), 3.0, 3.0, {
    name = 'impound',
    heading = 320,
    debugPoly = false,
    minZ = 28.3,
    maxZ = 32.3,
}, {
    options = {
        { type = 'client', event = 'garage:client:impound',
          icon = 'fas fa-map', label = 'Impound lot', job = 'police' },
    },
    distance = 2.5,
})

What goes wrong

Two targeting resources is the classic mistake. Symptoms are duplicated options and an eye that flickers.

`job` takes a string or a table of job to grade. A typo in the job name produces an option nobody can ever see, with no error.

debugPoly on a live server is a visible performance and appearance bug, and it is very easy to forget.

Distance is measured to the target, not to the zone edge. A large zone with a small distance is unreachable from most of it.

qb-target — questions people ask

Should I switch from qb-target to ox_target?
If your scripts support it, yes — ox_target is faster and maintained. Check first: a script that calls exports['qb-target'] directly needs either an update or ox_target's compatibility shim.
Why does my target option not appear?
Usually job or item gating that does not match, a zone with wrong minZ/maxZ, or the resource registering its targets before the target system started.

Runs alongside

PolyZone

The zone library that taught FiveM to think in shapes: polygons, boxes, circles and entity zones with enter and exit events.

ox_target

The third-eye interaction system most modern scripts target: look at a thing, get a menu, click an option.

qb-core (QBCore)

The roleplay framework most new FiveM servers are built on, with the largest modern script ecosystem and a one-click txAdmin recipe.