Interact
Bridge.Interact puts a keycap on a world point or entity. When the player is within distance, the keycap shows; within expandDistance it expands into a navigable option list (arrow keys / scroll to move, the confirm key to select). A single-option shorthand also works.
label + onSelect directly, no options list:
Anchor to a moving entity
Passentity or netId instead of coords to track a moving object; offset shifts the anchor from its origin.
Options & fields
The anchor. Use
coords for a fixed point, or entity / netId to track a moving object.Text shown when the prompt is collapsed (and the default option label).
The confirm key. A letter (
'E', 'F', 'G', 'H', 'K', 'N', 'M', 'B', 'R', 'SPACE') or a raw control id.Range at which the keycap appears.
Range at which the prompt expands into the option list.
Offset from the anchor entity’s origin.
The option list. Each option:
label, icon, canInteract (a function returning a boolean), onSelect.Top-level gate for the whole prompt (single-option form).
onSelect runs in your resource’s VM, so it sees your script’s state directly — there is no event bus.
Suspend & resume
Hide all of your resource’s prompts under a named reason (reference-counted, so nested suspends are safe). Useful while a menu is open.| Method | Effect |
|---|---|
Bridge.Interact.Add(opts) | Add a prompt; returns { id, Remove }. |
Bridge.Interact.Remove(id) | Remove a prompt by id. |
Bridge.Interact.Suspend(reason?) | Hide this resource’s prompts under a reason. |
Bridge.Interact.Resume(reason?) | Lift a suspend reason. |
Bridge.Interact is the bridge’s own interaction system and is always available. For entity/zone targeting that integrates with ox_target / qb-target, use Bridge.Target instead.Zones
Bridge.Zones fires callbacks as the player crosses area boundaries. onEnter / onExit fire on boundary crossing; onInside runs per-frame while inside. Use zones for static areas (job zones, safe zones, blip triggers); for “press E” prompts use Interact above. One adaptive scan loop drives every zone, so they are cheap at idle.
Shapes
The zone handle
| Constructor | Shape |
|---|---|
Bridge.Zones.Sphere(coords, radius, opts) | A sphere. |
Bridge.Zones.Box(coords, size, opts) | A heading-rotated box. |
Bridge.Zones.Circle(coords, radius, opts) | A vertical cylinder. |
Bridge.Zones.Poly(points, opts) | A polygon with optional Z bounds. |
opts accept onEnter, onExit, onInside, enabled, id, and data.
Blips
Bridge.Blips wraps the GTA blip natives with a tracked handle, and frees every blip your resource created when it stops.
Radius blip
Options & handle
Blip position.
Blip sprite id (coord blips only).
Blip color id.
Map name for the blip.
Standard blip styling;
route = true draws a GPS route to the blip.SetColor, SetSprite, SetScale, SetAlpha, SetLabel, SetRoute(on, color?), plus Exists() and Remove().
| Method | Effect |
|---|---|
Bridge.Blips.Add(opts) | Add a coord blip; returns a handle. |
Bridge.Blips.AddRadius(opts) | Add a radius blip; returns a handle. |
Bridge.Blips.Clear() | Remove every blip this resource created. |
