ZerØ Network

Instructions & User Guide — ZerØ Target

Version: 1.0.0 | Author: ZerØ Network (Core Overextended) | Frameworks: QBCore, Qbox, ESX Legacy, OX Core, Standalone
Performance: 0.00 ms (Idle CPU) / 0.01 ms (Active scanning) | Compatibility: Universal Hybrid (ox_target, qb-target, qtarget)


Table of Contents

  1. General Overview
  2. System Requirements
  3. Step-by-Step Installation
  4. General Configuration (shared/config.lua)
  5. Player Usage Guide
  6. Universal Script Compatibility
  7. Frequently Asked Questions (FAQ)

1. General Overview

ZerØ Target is an advanced, high-performance interaction framework that seamlessly merges the robust foundation of ox_target with complete backward compatibility for qb-target and qtarget.

Key Highlights:

  • 100% Native Backward Compatibility: Automatically intercepts and responds to all exports and client events targeting ox_target, qb-target, or qtarget. No modifications to third-party resources required.
  • Ultra-lightweight Performance: Fine-tuned to maintain 0.00 ms at idle and a maximum of 0.01 ms during active scanning via adaptive raycast throttling.
  • Dual Operating Modes: Easily toggle between classic hold-key mode (Left ALT) and continuous mode (always active when looking at interactables).
  • Real-Time Player Customization: Interactive NUI menu accessible via /targetmenu, allowing players to customize crosshair shapes (diamond, circle, square), colors, fonts, and controls with persistent local KVP storage.
  • Optional 3D Proximity Beacons: DirectX projector utilizing an isolated texture dictionary to display 3D pins over nearby interactable targets without interfering with other scripts.

2. System Requirements

  • FXServer: Recommended version 7290 or higher (minimum Cerulean / OneSync enabled).
  • Mandatory Dependencies:
    • ox_lib (required for spatial zone math and localization).
  • Supported Frameworks:
    • QBCore (Automatic detection of jobs, gangs, and citizen IDs).
    • Qbox (qbx_core, native group, job, gang, and citizen ID support).
    • ESX Legacy (Automatic detection of primary and secondary jobs).
    • OX Core (Full native support).
    • Standalone (Operates independently using GTA V native entities and coordinates).
  • Supported Inventories:
    • ox_inventory (Instant reactive item count search via Search('count') and itemCount event).
    • qb-inventory (Real-time sync via OnPlayerUpdated event and native HasItem export).
    • Standard ESX and QBCore inventories (Automatic universal caching via PlayerData.items and PlayerData.inventory).

3. Step-by-Step Installation

Step 1: Resource Placement

Extract or place the zero_target directory into your server's resource path (e.g., resources/[zero]/zero_target).

Step 2: Remove Replaced Resources

Because zero_target specifies provide 'ox_target', provide 'qb-target', and provide 'qtarget':

  1. Stop and remove (or disable) any existing copies of qb-target, ox_target, or qtarget to prevent naming or port conflicts.
  2. Existing scripts (jobs, stores, vehicles, robberies) do not require any code changes; their exports will be handled seamlessly by zero_target.

Step 3: Server Configuration (server.cfg)

Ensure ox_lib starts before zero_target:

ensure ox_lib
ensure zero_target

4. General Configuration (shared/config.lua)

The shared/config.lua file contains server-wide default options:

Config = {}

-- Framework detection ('auto', 'qbcore', 'esx', 'ox', 'standalone')
Config.Framework = "auto"

-- Initial default player controls
Config.Control = {
    useKey = true,        -- true = Starts in key mode (ALT), false = Starts in continuous mode
    key = 'LMENU',        -- Default key (Left ALT). Configurable by players in GTA settings
    toggle = false        -- false = Hold key to open target, true = Toggle on/off with a single press
}

-- ==========================================
-- 🕹️ INTERACTION / SELECTION MODE
-- ==========================================
-- Defines how players trigger target options:
-- "hold"  = Press and hold 'E' key (800ms) until circular progress fills
-- "press" = Tap once: a single press on 'E' triggers the action immediately
-- "click" = Mouse click: displays an animated pointing hand icon and confirms with Left Click
Config.InteractionType = 'hold'

-- In-game Settings Command (Configurable by developers)
Config.SettingsCommand = 'targetmenu' -- Opens the settings panel (/targetmenu)

-- Interaction and Proximity Distances
Config.Interactions = {
    drawDistance = 7.0,      -- Maximum distance to display target options
    interactDistance = 2.0,  -- Maximum distance to trigger interactions
    proximityDistance = 7.0  -- Detection radius for 3D proximity pins
}

-- 👁️ 3D PROXIMITY BEACONS (World Sprites)
Config.Visual = {
    drawSprite = true,        -- true = Render 3D beacon over nearby entities, false = Disabled (0.00ms)
    sprite = 'pin.png',       -- 'pin.png' (Luminous white 3D sphere) or 'pin2.png' (Teal Chevron Diamond)
    size = { width = 0.009, height = 0.016 }, -- Compact size calibrated for 16:9 ratio
    color = { r = 255, g = 255, b = 255, a = 215 }, -- Sprite color and opacity
    pulse = true              -- Subtle breathing pulse animation to highlight targets
}

-- NUI Interface Customization
Config.UI = {
    MainColor = '#ffffff',   -- Default hex color
    Shape = 'diamond',       -- Reticle shape: 'diamond', 'circle', 'square'
    Font = 'Outfit'          -- Default typography ('Outfit', 'Roboto', 'Montserrat', etc.)
}

5. Player Usage Guide

Key Mode (Classic)

  • Hold down Left ALT (or your mapped key).
  • Aim your crosshair or cursor at a vehicle, NPC, entity, or designated zone.
  • If interactions are available, the target icon expands to display the options menu.
  • Release the key to close the target interface.

Continuous Mode (Modern)

  • No key holding required.
  • The center reticle rests unobtrusively on the screen.
  • When looking directly at an interactable entity within range, options appear instantly.
  • Ideal for high-immersion and fast-paced roleplay servers.

In-Game Customization Menu (/targetmenu)

Any player can open the customization panel by typing:

/targetmenu

An interactive modal built on the ZerØ Network Design System (matching the visual identity of zero_rent) will open:

  1. Scanning Mode: Toggle between Press (ALT) (holding ALT to scan) or Continuous (automatic detection on gaze).
  2. Accent Color: Pick from ZerØ quick presets (Crimson, Blue, Emerald, Amber, Purple) or input any custom HEX code.
  3. Typography: Live switching between optimized fonts (Outfit, Roboto, Montserrat).
  4. Indicator Shape: Choose between Diamond, Circle, or Square.
  5. Live Target Preview: A real-time demo panel displaying the target reticle, shockwave pulse, and sample option list.

[!NOTE] The interaction execution mode (hold, press, or click) is managed centrally by developers in config.lua (Config.InteractionType) to ensure server-wide gameplay consistency. Players can view the active server policy directly on the status badge inside the menu. All personal visual preferences (scanning mode, color, shape, font) are saved automatically in client local storage (KVP) and persist across game restarts and reconnections.

Interaction Controls (Configured by Server Policy)

  • Navigation: Use the Mouse Scroll Wheel (Up / Down) to browse through options.
  • Execution according to Config.InteractionType:
    • Hold Mode ('hold'): Press and hold E (circular 800ms progress bar) to execute the chosen action.
    • Tap Mode ('press'): Tap E once for immediate execution without delay.
    • Click Mode ('click'): The indicator displays a pointing hand icon; confirm any action directly with Left Click on your mouse (or E key).

6. Universal Script Compatibility

zero_target serves as a drop-in replacement across QBCore, Qbox, ESX, and standalone setups:

Target System Monitored Calls Status in ZerØ Target
qb-target exports['qb-target']:AddBoxZone(...)
exports['qb-target']:AddTargetModel(...)
exports['qb-target']:AddTargetEntity(...)
exports['qb-target']:AddTargetBone(...)
100% Compatible (Supports singular and plural method names, wrapped action(entity, data)).
ox_target exports.ox_target:addBoxZone(...)
exports.ox_target:addModel(...)
exports.ox_target:addGlobalVehicle(...)
100% Compatible (Native internal API).
qtarget exports.qtarget:AddBoxZone(...)
exports.qtarget:Vehicle(...)
exports.qtarget:Ped(...)
100% Compatible (Full export proxy mapping).
Legacy Net Events TriggerEvent('qb-target:client:AddBoxZone', ...) 100% Compatible (Registered event handlers).

7. Frequently Asked Questions (FAQ)

1. How can I rebind the interaction key if I don't want to use ALT?

Players can rebind the key at any time in GTA settings without modifying code: Pause (ESC) > Settings > Key Bindings > FiveM > Interact with Eye (Target).

2. Why are job-specific options not showing up?

Ensure the player's job identifier and grade match the script's option requirements. zero_target automatically verifies that the player's job grade is greater than or equal to the required minimum.

3. Does continuous mode impact frame rates?

No. Thanks to adaptive sleep throttling, the scanner sleeps for 60 ms to 100 ms when gazing at non-interactable surfaces (roads, buildings, ground) and only drops to 0 ms when aiming at an active target.

4. How do I enable the 3D proximity pins?

In shared/config.lua, set Config.Visual.drawSprite = true. This will display floating 3D pins over nearby interactable NPCs and entities.