T1 // Core & Engine

coetarget

Sub-Tick Spatial Raycasting

Third-Person Contextual Interaction with Zero Idle Draw

HEADLESS SERVICE (NO UI)
DEPENDS ON coe_corecoe_ui
coetarget 10 exports · 3 commands

Runs without a NUI: nothing is rendered on the client and the resource stays idle until events arrive.

01 // OVERVIEW

Replaces legacy floating 3D markers and proximity draw loops that polluted map views and wasted CPU ticks. Holding the interaction key projects a sub-tick raycast cone from the screen center, identifying vehicles, peds, doors, ATMs, and world objects with instantaneous action menus.

On FiveM Enhanced

Utilizes FiveM Enhanced high-precision raycasting primitives with sub-tick interpolation, guaranteeing geometry detection even while traveling at high speeds.

02 // FEATURES

What the module delivers

01

Zero Idle Consumption

Thread remains completely dormant when the player is not actively holding the target key.

02

Entity & Model Filters

Binds actions to specific vehicle models, shopkeeper peds, or prop hashes.

03

3D Box Zones

Volumetric collision polygons in world space for workstation areas, bank vaults, and doors.

04

Visual Haptic Reticle

Tactical reticle dynamically shifts color and pulses upon acquiring interactable targets.

ARCHITECTURAL LAYERS // CLEAN ARCHITECTURE

4-Layer Isolation with 0.00 ms Idle

Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:

L4
Headless Operation (No UI)
Zero DOM · CoE UI Delegation
Headless
L3
Application & Server
Atomic locks · Rate limiting
Auth Server
L2
Platform & HAL
Core.Platform · Mock natives
Gen9 HAL
L1
Domain & ACID Database
Prepared SQL · MariaDB pool
ACID Pool
LAYER 04 // HEADLESS SERVICE

Headless Service (No Dedicated NUI)

Operates strictly within layers L1–L3 (domain, HAL, and server-authoritative application logic). Visual interactions and management flows are delegated to centralized ecosystem apps (coe_ui / coe_tablet), guaranteeing 0.00 ms idle client overhead in FiveM DX12.

Zero CEF graphic overhead: no background web pages or NUI bridges loaded
Typed public contracts (types.lua) consumed directly by external resources and UIs
Strict adherence to the Server-Authoritative model with zero direct DOM manipulation
ADMIN POWERS // OPERATION & MANAGEMENT

What this script delivers to Server Owners

Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:

🎯
Hitbox & Raycast Debug
Toggles 3D vector visualizers for interaction hitboxes and collision lines.
/targetdebug
➕
Dynamic Registration
Registers new interactive models, vehicles, and peds in runtime via export.
exports.coetarget:AddTargetModel(model, options)
⚡
Smart Culling
Suspends collision calculations for entities outside the player frustum.
0.00 ms idle guaranteed
03 // EXPORTS

Public API 10

Typed contracts to call from other resources. Full types live in types.lua and in the docs reference.

exports['coetarget']:AddTargetEntity(entity, options) → boolean

Registers interaction options for a specific entity.

ParameterType
entityinteger
optionsCoeTargetOption[]
LUA
local result = exports['coetarget']:AddTargetEntity(entity, options)
exports['coetarget']:RemoveTargetEntity(entity) → void

Removes target options for a specific entity.

ParameterType
entityinteger
LUA
exports['coetarget']:RemoveTargetEntity(entity)
exports['coetarget']:AddTargetModel(model, options) → boolean

Registers interaction options for all entities matching a model hash or name.

ParameterType
modelinteger|string
optionsCoeTargetOption[]
LUA
local result = exports['coetarget']:AddTargetModel(model, options)
exports['coetarget']:RemoveTargetModel(model) → void

Removes target options for a model.

ParameterType
modelinteger|string
LUA
exports['coetarget']:RemoveTargetModel(model)
exports['coetarget']:AddTargetGlobal(entityType, options) → boolean

Registers interaction options for all entities of a global category.

ParameterType
entityTypeCoeTargetGlobalType
optionsCoeTargetOption[]
LUA
local result = exports['coetarget']:AddTargetGlobal(entityType, options)
exports['coetarget']:RemoveTargetGlobal(entityType) → void

Removes target options for an entity category.

ParameterType
entityTypeCoeTargetGlobalType
LUA
exports['coetarget']:RemoveTargetGlobal(entityType)
exports['coetarget']:AddTargetSurface(options) → boolean

Registers options for any targeted surface; `entity` is 0 when raycast hits static map geometry.

ParameterType
optionsCoeTargetOption[]
LUA
local result = exports['coetarget']:AddTargetSurface(options)
exports['coetarget']:RemoveTargetSurface() → void

Removes all registered surface target options.

No parameters.

LUA
exports['coetarget']:RemoveTargetSurface()
exports['coetarget']:AddTargetZone(id, coords, radius, options) → boolean

Zona espacial esférica indexada em Grade de Hash Espacial de 64 bits (O(1) nas células vizinhas).

ParameterType
idstring
coords{
radiusnumber
optionsCoeTargetOption[]
LUA
local result = exports['coetarget']:AddTargetZone(id, coords, radius, options)
exports['coetarget']:RemoveTargetZone(id) → void

ParameterType
idstring
LUA
exports['coetarget']:RemoveTargetZone(id)
04 // COMMANDS

In-game commands 3

[LMENU]

Toggle interaction target · +coetarget · rebindable in FiveM key bindings

/target

Toggles the interaction target.

/targetdebug

F8 diagnostics of the entity under the crosshair.