ai-target
The target eye. Markers on what a player can interact with; the interaction key picks one. Answers the ox_target API.
ai-target puts small markers on the people, objects, vehicles and places a player can interact with. The player looks at one, presses the interaction key (E), and the action runs. When a point has several actions, a small menu opens to pick one.
What it does in the game
- Markers near the camera. Every interaction point within reach shows a marker, a little before it is in reach, so players see where they can do something.
- Focus. The marker the player looks at is in focus and shows its action.
- One key. The same interaction key as the prompts (ai-lib's E) uses the focused marker.
- Several options. A point with more than one action shows "N options" and opens a small menu.
- Job locks. An option can be limited to jobs or gangs (and a minimum grade). Other players do not see it.
Prompt or target: the owner chooses
Every ai-* script makes its places (shops, stashes, NPCs, doors) through AI Core's interaction points. The owner picks how they look, for all scripts at once, in AI Core's General tab (Interaction card, Interaction style):
- Prompt and key (default): a box on the right of the screen and the interaction key when close.
- Target eye: the points become target markers. This needs a target script such as ai-target; without one the prompt is used.
With Prompt and key picked, ai-target still runs, but only scripts that call the ox_target API themselves (third-party scripts) put markers on it.
Installation
The AI Core txAdmin recipe installs it. By hand: put the folder in resources/[ai]/ and add ensure ai-target to server.cfg after ensure ai-core. It needs ai-core. It has no database table.
Do not run ox_target next to it (ai-target answers ox_target's name). Then set Interaction style to Target eye in the General tab if you want every ai-* script on it.
Panel settings
None of its own. The only setting is AI Core's Interaction style (above).
Commands
None.
Keybinds
ai-target has no key of its own. It uses ai-lib's interaction key:
| Default key | What it does | Name in GTA settings |
|---|---|---|
| E | Uses the focused marker (or the prompt on screen) | Interact with the prompt on screen |
Works with other scripts
- Stands in for ox_target (
provide 'ox_target'). Scripts that callexports.ox_target:addBoxZone(...),addModel,addEntity,addGlobalVehicleand the other ox_target exports put their options on ai-target. - You can replace it. AI Core's interaction points also work with tgiann-radialmenu-target, tgiann-target, sleepless_interact, ox_target, qb-target and interact (darktrovx). Remove ai-target and start one of those; the first one running in that order is used. See Compatibility.
Known limits
- ox_target's global options (
addGlobalOption, options that hang on nothing) are not offered: they belong on a radial menu. A script that calls it gets a warning in the console. - An option's reach is at most 50 m (default 2.5 m).