Skip to main content
There’s no key to hold and no crosshair. As a player approaches something interactable, it reveals itself in stages - and the thing they’re looking at is the one that responds. Servers that want the classic hold-to-see feel turn on passive mode instead.

The Three Stages

Defaults live in Config.Stages, and any registration can override them with stages = { grain = ..., name = ..., reach = ... }. Native zones size their own stages from their shape, with reach meaning inside the zone; zones bridged from ox_target / qb-target reach from Config.Stages.reach outside their surface instead - the way their eye targeted them from a step away. Grain is distance alone; everything past it needs the player looking at the thing.

Focus

Only one thing ever speaks at a time: the anchor the player is looking at. An interaction shows while the camera is on it and folds away the moment it isn’t - back to its point of light, or to nothing, the same fold as walking away. Bigger and closer things are easier to hold: what counts is the camera being on the thing, not on its exact center. Focus prefers whatever is nearest the center of the screen and hands off between neighbours without flapping, and a label never shows through a wall: the line of sight is checked from the player’s character, not the camera. A ped is in view when its head or chest is (a clerk behind a counter shows from the chest up), an object or vehicle when its anchor or the top of its body is, and a zone counts whatever sits inside its own volume (the counter or machine it wraps) as its own. Nothing behind the player is ever focused. Anything moving faster than a jog - a passing car, a sprinting ped - disappears from the layer until it slows down. Holding the interact key (Left Alt by default) puts you in Focus: a soft vignette frames the screen for as long as it’s held - the sign you’re looking, without a crosshair. It points at nothing, so hidden interactions stay hidden; it pulses once when something reveals; and it stays out of the way while an inventory, the pause menu, or a progress bar has the screen. Config.Focus = false turns it off.

Input

Three rules, in order:
  1. An option’s own key activates that option while its stack is open. Options can bind any keyboard key by name. Until the stack opens, the game owns the keyboard - a bound F beside a closed menu still enters your vehicle.
  2. The confirm key (E by default) activates the highlighted option and opens closed lists. On a controller, LB fills this role.
  3. The interact key (Left Alt by default, rebindable by each player in FiveM’s key bindings) is the mouse’s way in. Holding it keeps the camera and movement yours, and puts your weapon away for the duration - a click is never a shot; with a stack on screen, a left click frees the cursor - hover to highlight, click to select, press-and-hold for hold options - and a right click hands the camera back. A click on a closed pill opens it in the same motion. This is how options without a key of their own are reached, it’s what reveals passive interactions, and holding it is what puts you in Focus.
Options with hold = <ms> are hold-to-confirm: a ring fills while the key is held, and releasing early cancels.

How lists open

Config.ExpandMode (or a per-anchor expand = ...) controls how a stack opens once you’re in reach:
  • 'smart' (default) - single options unfold on their own; multi-option stacks wait for the confirm key
  • 'auto' - always unfolds on its own
  • 'manual' - always waits for the confirm key

Reveal Modes

What renders before a point or zone is focused is its reveal mode (Config.Reveal, per-anchor reveal = ...):
  • 'ambient' - a grain of light marks it from a distance. The default for placed points - the grain is the invitation.
  • 'focus' - nothing renders until you look at it.
Entities - vehicles, peds and objects - always reveal on focus. They’re found by looking, so a street full of cars stays quiet until you look at one.
Zones coming through the ox_target / qb-target compatibility layers follow Config.Reveal.bridged - 'focus' by default, 'ambient' to give them all grains.

Passive Mode

By default the layer is proactive: things reveal themselves as you approach. Passive mode is the classic target feel instead - nothing shows until the interact key is held, then everything follows its reveal mode as usual, and it all vanishes the instant the key lets go. Three scopes:
  • Config.Passive = true - the whole server
  • Config.PassiveResources = { 'qb-drugs' } - only what those resources register. Escrowed scripts included: both compatibility layers apply it by the registering resource, so what one script places for an illegal activity stays invisible until a player who knows holds the key, while the rest of the server stays proactive
  • passive = true on any single registration
A hidden passive anchor doesn’t exist for the focus system - no grain, no label, no input, nothing for a passer-by to notice.

Feedback

Feedback is a script’s answer to an action, shown right on the interaction. When an option fires, nothing is claimed until its handler returns: a handler back right away gets its check right away; one that takes longer - awaiting a server callback, say - shows a small spinner on the row while the list stays open. The return value is the answer, and it lands on that same option: nothing returned is the plain check, false with a reason shakes the row and shows the reason where the label was, true with a note confirms alongside the check.
See Handlers for the full rules.

In a Vehicle

From a seat, anchors on other vehicles, peds, players and objects hide - none of them can be reached from inside a car - while points and zones stay live, since garages, drive-thrus and car washes are used from the driver’s seat. Config.InVehicle sets both defaults; a registration’s own inVehicle = true|false overrides them, and an option flagged allowInVehicle = true keeps its anchor live. The vehicle you’re sitting in follows Config.IncludeOwnVehicle.

Suppression

When the player is dead, cuffed, in the pause menu, running a progress bar (ox_lib’s or qb progressbar’s), or another resource holds the UI (inventory, phone), the whole layer goes quiet - and wakes the moment the state clears. The automatic reasons are toggled in Config.Suppress; scripts can also hold the layer down themselves:
Tags are independent - two scripts never fight over one switch, and a tag is held until its owner releases it.