Interact — Integrations ​
Interact works with your target resource in two ways. Pick the one that fits your server.
| Next to your target | Target Replacement | |
|---|---|---|
Your target (ox_target, qb-target, qtarget) | Stays installed | Deleted |
| Scripts made for Interact | Press E or target, as you choose in /fwb_interact | Press E or Interact’s own target, as you choose in /fwb_interact |
| Scripts made for ox_target / qb-target / qtarget | Keep using your target | Run on Interact without changes: press E or Interact’s own target, as you choose in /fwb_interact |
| Setup | Nothing to do | Turn on one line in fxmanifest.lua |
Next to your target ​
This is how Interact runs out of the box. Keep ox_target, qb-target or qtarget installed and started.
- Scripts made for Interact show the dot and
[E]prompt, or hand their spots to your target when they are set to target. - Every other script keeps using your target exactly as before.
Nothing else is needed.
Target Replacement ​
Target Replacement lets Interact take the place of ox_target, qb-target or qtarget. Scripts written for those targets keep calling exports.ox_target or exports['qb-target'] as always. Interact answers those calls itself, so the script's options show up on Interact. You don't change anything in those scripts.
Press E or target ​
You choose how those spots are used in /fwb_interact → General → How spots are used. It is saved on the server and applies to everyone live.
| Choice | What players do |
|---|---|
| Press E (default) | Walk up to the dot, look at it, press E. Several options show as a list: mouse wheel or arrow keys pick. |
| Target | Interact's own target, because no ox_target / qb-target runs any more. The dot turns into an eye box when you are close enough. Hold ALT: an eye shows in the middle of the screen, anywhere, like ox_target. Aim at the thing and its options show next to the eye, in the same rows as the press E list, each with its icon (the option's own, for example from ox_target, else Default icon on the Target tab). Left click: the mouse cursor appears, then click any option to run it. Let go of ALT and the list closes. Shooting and punching are blocked while ALT is held. Players can change the key in GTA Settings → Key Bindings → FiveM → Target eye (hold). |
Turn on Players can choose under it, and every player can pick press E or target for themselves on their Keys tab. They start on the admin's choice, and their pick only changes their own game.
This is the same for every script on the server, made for Interact or for a target: Interact decides, not the script.
How far the dot shows ​
For every spot, Dot range in /fwb_interact → General is counted on top of where the option can be used, so the dot always shows before the player is in reach:
| Option usable from | Dot range | Dot shows from |
|---|---|---|
distance = 2.0 (set by the script) | 3.0 m | 5.0 m |
no distance (uses Use distance, 1.5 m) | 3.0 m | 4.5 m |
Models, bones and global vehicles / peds / objects / players use Range on models the same way. Pressing E or the target eye still only works from the use distance.
Set it up ​
The steps, with pictures, are on Replace Ox/Qb Target: move the target out of resources, turn on its provide line, ensure fwb_interact right after your framework, restart the server, then pick press E or target.
What works ​
ox_target exports
| Export | |
|---|---|
addSphereZone, addBoxZone, addPolyZone | âś… Return the zone id like ox_target |
removeZone, zoneExists | âś… By id or by name |
addModel, removeModel | âś… |
addEntity, removeEntity | âś… Network ids |
addLocalEntity, removeLocalEntity | âś… |
addGlobalPed, addGlobalVehicle, addGlobalObject, addGlobalPlayer and their removeGlobal… | ✅ |
addGlobalOption, removeGlobalOption | âś… Every ped, vehicle and object |
getTargetOptions, disableTargeting, isActive | âś… |
Option fields: label, name, icon, distance, bones, groups, items, anyItem, canInteract, onSelect, export, event, serverEvent, command. They do the same as in ox_target. An option added again with the same name replaces the old one.
qb-target and qtarget exports
| Export | |
|---|---|
AddCircleZone, AddBoxZone, AddPolyZone, AddEntityZone, RemoveZone | âś… Height from minZ / maxZ |
AddTargetBone, RemoveTargetBone | âś… Vehicle bones |
AddTargetEntity, RemoveTargetEntity | âś… |
AddTargetModel, RemoveTargetModel | âś… |
AddGlobalPed, AddGlobalVehicle, AddGlobalObject, AddGlobalPlayer and their RemoveGlobal… | ✅ |
AddGlobalType, RemoveGlobalType | âś… |
Ped, Vehicle, Object, Player and their Remove… (old qtarget names) | ✅ |
SpawnPed, RemoveSpawnedPed | âś… |
AllowTargeting | âś… |
Option fields: label, icon, type + event (client, server, command, qbcommand), action, canInteract, job, gang, citizenid, item, distance. Options are removed by their label, like in qb-target.
Jobs, gangs and items are read from ESX, QBCore or Qbox, and from ox_inventory when it runs.
What doesn't carry over ​
- ox_target sub menus (
menuName/openMenu),offsetandiconColor. - qb-target
AddComboZone, itsGet…Data/Update…Datafunctions and entity outlines. - The door, hood and trunk options ox_target and qb-target put on every car are added by Interact instead: Car options with target in
/fwb_interact→ General (on by default), and Car options with press E (off by default). - Zones and peds in qb-target's own
config.luago with it. Add those from a script if you still need them. - Restarting
fwb_interactremoves the spots those scripts added, just as restarting ox_target does. Restart those scripts too, or the server.
Running fwb_interact and cr_interact together ​
Turn a target's provide line on in only one of them. If both have it on, fwb_interact answers and the console tells you which line to turn off. Scripts that cr_interact was told to put on a target keep their own dot and [E] prompt.
Turn it off again ​
Put the -- back in front of the provide line, add your target resource back with its ensure line right after your framework, and restart the server.
Troubleshooting ​
| Problem | Fix |
|---|---|
| "No such export … in resource ox_target" | The provide line for that target is still off, the server was only restarted per resource, or the script starts before fwb_interact. Turn the line on, ensure fwb_interact right after your framework, and restart the server |
| Red console line: "provide 'ox_target' is on, but ox_target is still in your resources" | Move the target resource out of the resources folder (a stopped copy in [disabled] counts too), or put the -- back |
| Yellow console line: "cr_interact also has provide 'ox_target' on" | Both Interacts have the line on. Put the -- back in the one the message names |
| A script won't start and says it needs ox_target | Check that the provide line is on and that fwb_interact is ensured right after your framework, before that script |
| An option with a job or item never shows | Check you have that job (and grade) or item. Jobs come from ESX, QBCore or Qbox; items from ox_inventory or your framework's inventory |
| A script's options are gone after restarting fwb_interact | Restart that script too, or the whole server |
| Something works with ox_target but not here | Tell us on Discord which script and which export it uses |
