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 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. Each of these prints a one-time console note if a script actually uses it:- 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 - approximated around the zone’s center. 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 - there’s no held key or crosshair, so the eye-machinery exports (
DisableTarget,EnableNUI, …) exist but do nothing.AllowTargetingstill works:falseputs the whole layer to sleep,truewakes it.
Reveal Mode
Bridged targets render nothing until you look at them by default. If you’d rather every bridged target get a grain (a point of light marking it from a distance), setConfig.Reveal.bridged = 'ambient' in config.lua.
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 control 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 control 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.
