Compatibility
How ox_target, qb-target, qtarget and bt-target exports map onto rw_interact.
rw_interact answers to exports['qb-target'], exports.qtarget and exports['bt-target'] as
well as exports.ox_target. Options written for them are converted on registration: job and
gang become requirements, item becomes an item requirement, type + event (or action)
become the select action, and num becomes the sort order.
These names only answer while the original resource is not running. Remove it from your
server.cfg and anything that depends on it starts against rw_interact instead.
ox_target
Every client export, under both exports.ox_target and exports.rw_interact: see
Exports.
qb-target
| Export | Notes |
|---|---|
AddCircleZone, AddBoxZone, AddPolyZone | Returns a handle with :destroy() |
AddEntityZone | |
RemoveZone | |
AddTargetBone, RemoveTargetBone | Vehicle bones |
AddTargetEntity, RemoveTargetEntity | Networked entities are kept by network id |
AddTargetModel, RemoveTargetModel | |
AddGlobalPed, AddGlobalVehicle, AddGlobalObject, AddGlobalPlayer and their Remove… | |
AddGlobalType, RemoveGlobalType | |
AllowTargeting, IsTargetActive, IsTargetSuccess | |
AddComboZone | Not supported: logs a warning. Register the zones one by one. |
qb option fields: type (client, server, command, qbcommand), event, action,
icon, label, job, gang, item, citizenid, canInteract(entity, distance, data), num.
The event receives the option table with entity added, as qb-target sends it.
qtarget
| Export | Notes |
|---|---|
AddCircleZone, AddBoxZone, AddPolyZone, AddEntityZone, RemoveZone | |
AddTargetBone, RemoveTargetBone | |
AddTargetEntity, RemoveTargetEntity | |
AddTargetModel, RemoveTargetModel | |
Ped, Vehicle, Object, Player and RemovePed, RemoveVehicle, RemoveObject, RemovePlayer | Globals |
AllowTargeting |
bt-target
| Export | Notes |
|---|---|
AddCircleZone, AddBoxZone, AddPolyZone, RemoveZone | job = { 'all' } means anyone |
AddTargetModel |
ox_target's built-in options
ox_target's default vehicle options (each door, the hood and the trunk) are built in. Each part
gets its own marker on that part of the car and says what it will do ("Open Trunk" /
"Close Trunk"). Switch them off with Vehicle doors in /interactAdmin; the code is the
non-escrowed client/defaults.lua.