addModel registers a rule: every matching vehicle, NPC ped, or object near the player becomes interactive automatically - no spawn tracking, no handles, no per-entity registration. One line covers every vending machine in the city.
nil with a console error explaining what’s wrong. exports.lation_interact:remove(id) removes the rule and every anchor it created, immediately. Rules are also cleaned up when your resource stops.
This page covers what
addModel adds on top of the shared vocabulary. The anchor fields (label, options, icon, stages, expand, reveal, debug), the option table, condition gates, and handlers are documented in Options.Parameters
string | number | (string | number)[]
Model name(s) or joaat hash(es) - a single value or an array, mixing names and hashes freely. Names are hashed for you. A call with no valid model rejects with a console error and returns
nil.table
required
The anchor template - all the shared anchor fields plus the same placement fields
addEntity takes:bone(string) - bone the anchor rides on each matching entity (e.g.'boot'); missing bones fall through tooffset, then to the entity centeroffset(vector3) - entity-local offset from the center, rotating with the entity
24 matches are active at once - over the cap, the nearest win.
Merging
When several sources target the same entity at the same spot (samebone/offset/center), they merge into one stack, ordered by priority: explicit addEntity > model rules > globals. The highest-priority contributor provides the presentation (label, icon, stages, expand, reveal); the options stack beneath it in priority order.
Evidence Van - never two overlapping anchors. A different bone or offset is a different spot and stays its own stack.
Behavior Notes
Quiet until looked at
Quiet until looked at
Rule-created anchors default to
reveal = 'focus': nothing renders until the player looks at the entity. Pass reveal = 'ambient' on the rule to mark every match with a grain of light from a distance - right for vending machines, wrong for traffic.Your own vehicle
Your own vehicle
The vehicle you’re sitting in is skipped by default. Scripts that expect their options while seated need
Config.IncludeOwnVehicle = true.Moving entities
Moving entities
A match moving faster than
3.0 m/s holds at the grain stage and can’t be focused. It becomes interactable the moment it slows down.