Interaction · Overextended

ox_target for FiveM

What it is

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

Targeting replaced the wall of `/commands` and proximity keypresses that older servers ran on. ox_target registers interactions against models, entities, zones and bones, and shows the player only the options they can actually use — which is what makes an armoury, a weapon bench or a gun shop feel like part of the world rather than a chat command.

Official documentation Repository All resources

At a glance

MaintainerOverextended
Latest releasev1.18.1 · 2026-04-25
Last code change2026-06-09
LicenceMIT
Written inLua
GitHub stars174
StatusActive

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

Why servers run it

  • Options can be filtered by job, group, item or an arbitrary canInteract function, so the menu is always honest.
  • It registers against models, networked entities, local entities, zones and bones — the full set, not just spheres.
  • It is a drop-in replacement for qb-target for most scripts, and ships a compatibility layer for the rest.
  • Performance is measured in hundredths of a millisecond because it only raycasts when the player asks.

Installing ox_target

  1. 1. Install ox_lib

    ox_target uses ox_lib's UI and zone modules.

  2. 2. Download a release

    Same rule as the rest of the ox stack — the release carries the compiled UI.

  3. 3. Start it before anything that registers targets

    ensure ox_lib, then ox_target, then your resources.

  4. 4. Disable the old one

    Running qb-target and ox_target at the same time gives the player two overlapping eyes.

Working examples

A weapon bench any mechanic can use

exports.ox_target:addBoxZone({
    coords = vec3(-661.2, -933.9, 21.8),
    size = vec3(2, 2, 2),
    rotation = 305,
    debug = false,
    options = {
        {
            name = 'weapon_bench',
            icon = 'fa-solid fa-screwdriver-wrench',
            label = 'Service weapon',
            groups = { mechanic = 0 },
            onSelect = function()
                TriggerEvent('myserver:serviceWeapon')
            end,
        },
    },
})

Targeting every copy of a model

exports.ox_target:addModel({ `prop_gun_rack_01` }, {
    {
        name = 'gun_rack',
        icon = 'fa-solid fa-gun',
        label = 'Take a weapon',
        items = 'armoury_key',          -- only shown if they carry it
        onSelect = function(data)
            TriggerServerEvent('myserver:takeWeapon', data.entity)
        end,
    },
})

What goes wrong

Do not run two targeting resources. Pick one. Two eyes means two menus and two raycasts.

`groups` takes a table of group to minimum grade, not a string. groups = 'police' works as shorthand; groups = { police = 2 } is the rank-aware form.

Model targets use hashes. Backticks around the model name, as everywhere else in FiveM.

debug = true draws the zone. Leave it on while placing a bench and remember to turn it off before you ship.

ox_target — questions people ask

ox_target or qb-target?
ox_target for new work: it is faster, actively maintained and filters options properly. qb-target is still required by older QBCore scripts that call its exports directly, though ox_target ships a compatibility shim for most of them.
Where are the ox_target docs?
coxdocs.dev/ox_target, with a page per export and full option tables.

Runs alongside

ox_lib

The shared library half the modern FiveM ecosystem depends on: menus, notifications, progress bars, zones, callbacks and a cache.

qb-target

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

PolyZone

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