lation_interact is a drop-in replacement for qb-target. Every export - AddBoxZone, AddTargetModel, AddTargetEntity, the globals, the data accessors, all of it - is answered under the qb-target name, with the behavior your scripts expect: label keying, job/gang/item/citizenid gates, canInteract, event dispatch by type, cleanup when a resource stops. Works with QBCore and Qbox. No consumer script needs editing.
The switch:
- Remove (or stop) the real
qb-target ensure lation_interactafter your framework core, before your inventory and every script that uses targeting
qb-target also doubles as a ped spawner (
SpawnPed, RemoveSpawnedPed, DeletePeds, GetPeds) - plenty of scripts rely on it, so it ships here too and works identically, including spawn-on-load and cleanup on player unload.What You Might Notice
A few things don’t translate one-to-one from the targeting eye to an attention model. Poly and combo zones print a one-time console note; the rest are silent:- Zones reach from a step away - the stack goes live within
Config.Stages.reach(2.4m) of the zone’s surface, never farther than the zone’stargetoptions.distance. qb’s eye reached a default-distance zone from7.0m; the per-option distance gates are still qb’s exact math. - Poly and combo zones become spheres - wide enough to reach the zone’s farthest point, so a long thin poly is the worst fit. Box and circle zones are exact.
- Eye cosmetics are ignored -
targeticon,drawColor,drawDistance, and outline settings have no meaning without a crosshair. - No targeting eye - nothing has to be held to see an interaction and there’s no crosshair, so the eye-machinery exports (
DisableTarget,EnableNUI, …) exist but do nothing. The interact key - Left Alt by default, and rebindable by each player - still reveals passive interactions and frees the cursor for clicks; it just isn’t an eye.AllowTargetingstill works:falseputs the whole layer to sleep,truewakes it. - Targets behind the player are ignored - qb’s eye reached anything the camera was pointed through. Here nothing at the player’s back is focused, and a camera pushed into a wall can’t see past it. From a seat their own vehicle doesn’t block it, so drive-thrus and garages still work.
Reveal Mode
Bridged content renders nothing until you look at it. If you’d rather every bridged zone get a grain (a point of light marking it from a distance), setConfig.Reveal.bridged = 'ambient' in config.lua. Bridged entities, models and globals always reveal on focus.
qtarget
qtarget is where qb-target came from, so its exports are answered under theqtarget name too - AddCircleZone, AddBoxZone, AddPolyZone, AddEntityZone, AddTargetBone, AddTargetEntity, AddTargetModel, the Ped / Vehicle / Object / Player shorthands, and every matching Remove*. Scripts that still register through qtarget (a habit from when the one name worked under both targets) need no changes, and required_item gates like item. Registrations share the qb-target registries, so a zone added under one name removes under the other.
Vehicle Doors
Door, hood and trunk toggles are built in - one chip per door, on the door itself - so qb-target’sConfig.EnableDefaultOptions isn’t missed. Config.VehicleDoors = 'passive' keeps them hidden until the interact key is held; false turns them off.
Per-Script Behavior
Two things you can set without touching the script itself:- Passive - list a resource in
Config.PassiveResourcesand everything it registers stays hidden until the interact key is held, like a classic target. See passive mode. - In a vehicle - options a script flags with
allowInVehicle = truestay live from a seat; everything else followsConfig.InVehicle. See in a vehicle.
