Bridge.Target is a normalized targeting API. You register interactions on entities, models, or world zones with a single option shape, and the bridge dispatches to whatever targeting resource is running — ox_target, qb-target, or, with neither installed, its own Interact prompts. Your call site stays the same across all three.
Availability
Client only.Provider selection
Target reads its own convar —atlas:target, not atlas:ui:target.
| Value | Renderer |
|---|---|
auto (default) | ox_target started → ox; else qb-target started → qb; else own. |
ox | ox_target. |
qb | qb-target. |
own | The bridge’s own Interact prompts. |
custom | Your own resource — fill editable/target.lua. |
Option shape
EveryAdd* call takes a list of options with this normalized shape:
The interaction label shown on the eye/prompt.
An icon for the option.
Max interaction distance.
fun(entity): boolean — return false to hide the option dynamically.fun(entity) — called when the option is chosen. Receives the targeted entity (for AddEntity / AddModel).Methods
AddBoxZone
Center of the box.
Box dimensions.
Box rotation (honored by ox_target / qb-target).
The interaction options.
AddSphereZone
Center of the sphere.
Sphere radius.
The interaction options.
AddEntity / AddModel
For
AddEntity — the entity handle to attach options to.For
AddModel — one or more model names (ox_target / qb-target only).The interaction options.
Remove
Bridge.Target.Remove(id) — removes a zone/entity registration by the id returned from any Add* call.
