🎯nova_target

NOVA Framework raycast targeting system (third-eye). Provides a context menu for interacting with entities, models, zones, and global elements.

Features

  • Global Options β€” Add options to all peds, vehicles, players, or objects

  • Model Targeting β€” Add options to specific model hashes

  • Entity Targeting β€” Add options to specific entity network IDs

  • Zone Targeting β€” Box, sphere, and polygon zones with options

  • ox_target Compatibility β€” Drop-in replacement for ox_target

  • qb-target Compatibility β€” Drop-in replacement for qb-target

Configuration

Edit config.lua:

Config.Key = 'LMENU'               -- Key to activate targeting (Left Alt)
Config.MaxDistance = 7.0            -- Maximum raycast distance
Config.DrawDistance = 10.0          -- Distance to draw target indicator
Config.EnableCompat = true          -- Enable ox_target/qb-target compatibility
Config.Debug = false                -- Show debug zones

Configuration Options

Option
Type
Default
Description

Key

string

'LMENU'

Activation key name

MaxDistance

number

7.0

Raycast distance

DrawDistance

number

10.0

Indicator draw distance

EnableCompat

boolean

true

Enable compat layer

Debug

boolean

false

Debug zone visualization

Exports

Global Options

Global Vehicle / Player / Object

Model Targeting

Entity Targeting

Zone Targeting

Utility

Option Format

Each option in an options array:

Property
Type
Required
Description

name

string

Yes

Unique identifier

icon

string

No

FontAwesome icon class

label

string

Yes

Display text

onSelect

function

Yes

Callback when selected

canInteract

function

No

Condition check (return true/false)

distance

number

No

Override max distance for this option

groups

table

No

Required job/gang groups

Compatibility

When Config.EnableCompat is true, the resource provides compatibility with:

  • ox_target β€” All ox_target exports work as-is

  • qb-target β€” All qb-target exports work as-is

This means scripts written for ox_target or qb-target will work with nova_target without modification.

Compatibility Exports (PascalCase)

Dependencies

  • None β€” This is a standalone resource

Notes

  • Hold the activation key (Left Alt by default) to enter targeting mode

  • A crosshair/eye icon appears when targeting is active

  • Options appear in a context menu when hovering over a valid target

  • The canInteract function is called every frame while targeting β€” keep it lightweight

  • Zone debug mode (Config.Debug = true) draws zone outlines for development

Last updated