About ox-target
ox-target is a FiveM skill for adding interaction targets to entities, models, players, and locations. It guides developers through choosing the appropriate ox_target function and producing runnable Lua, including migration from qb-target.
Key features
- 01Selects target functions by entity or location type
- 02Supports entity, model, global, and zone targets
- 03Builds options with visibility and action routing
- 04Covers qb-target migration
- 05Outputs Lua using exports.ox_target
Use cases
- 01Adding an interaction to a vehicle, door, or prop
- 02Making a locally spawned entity interactable
- 03Migrating an existing qb-target interaction
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ germanfndez/ fiveai-skills --skill ox-targetAfter installing, type/ox-targetin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
rules/entities.mdmigration.mdoptions.mdsetup.mdzones.mdDetails
From the project READMEox_target
Third-eye targeting for FiveM. Replaces qb-target and bt-target. Supports ox_core, esx and qbx_core.
Activation Contract
Load this skill when the user asks to make something interactable: "press E on this ped", "third eye", "target option", "add an interaction to this vehicle/door/prop", or when migrating from qb-target.
Hard Rules
- Call every function through
exports.ox_target:<fn>(...). There is no globalox_targettable. onSelectruns on the CLIENT. Never trust its arguments server-side: re-validate in theserverEventhandler.- Always pass
nameon an option you intend to remove later. Removal is by name, not by index. distancedefaults to the resource default; set it explicitly for anything above ~2.5m.- Zone and entity functions are CLIENT-side only.
- Prefer
addLocalEntityfor entities you spawned yourself; useaddEntityonly for networked entities and expect the id to change on respawn.
Decision Gates
| Target | Function |
|---|---|
| One entity you spawned locally | addLocalEntity(entities, options) |
| A networked entity (net id) | addEntity(entities, options) |
| Every instance of a model | addModel(models, options) |
| Every ped / vehicle / object / player | addGlobalPed / addGlobalVehicle / addGlobalObject / addGlobalPlayer |
| Everything, no filter | addGlobalOption(options) |
| A location, not an entity | addBoxZone / addSphereZone / addPolyZone |
Execution Steps
- Confirm
ox_targetis started AFTERox_libinserver.cfg. - Pick the function from the Decision Gates table.
- Build the options array. Read rules/options.md for every allowed field.
- Gate visibility with
groups,itemsorcanInteractrather than checking insideonSelect. - Route the action:
onSelectfor client logic,serverEventfor anything that grants money, items or state. - Store the returned zone id if the zone must be removed later.
Output Contract
Return runnable Lua using exports.ox_target. Include the fxmanifest.lua dependency lines when the resource is new. Never emit qb-target syntax.
References
- rules/setup.md — install, fxmanifest, convars, framework support.
- rules/options.md — every field of the option table.
- rules/entities.md — entity, model and global targets.
- rules/zones.md — box, sphere and poly zones.
- rules/migration.md — qb-target to ox_target.
Upstream docs: https://overextended.dev/ox_target