Targets
targets.lua
This module provides utility functions for adding and removing interaction targets with entities, models, zones, and coordinates.
Supports common targeting frameworks like ox_target
, qb-target
createEntityTarget(entity, opts, dist)
Adds interaction targets to a specific in-world entity.
Example:
createBoxTarget(data, opts, dist)
Creates an interactable box zone with configurable options.
Example:
createCircleTarget(data, opts, dist)
Creates an interactable circular zone.
Example:
createModelTarget(models, opts, dist)
Adds interactions to all matching models globally.
Example:
removeEntityTarget(entity)
Removes all targets linked to the specified entity.
Example:
removeZoneTarget(target)
Removes a named zone-based target.
Example:
removeModelTarget(model)
Removes interactions tied to a model globally.
Example:
Last updated