New Script Release - HTN-Target

New Script Release - HTN-Target

We’re excited to introduce the refreshed htn target, built to deliver a cleaner, faster, and more immersive targeting experience for your FiveM server.

The new UI focuses on clarity and responsiveness, with smooth state transitions and an intuitive diamond-based interaction flow.


🧭 Target State Flow

Seamless frontend state handling for every stage of interaction:

  • Hidden state when inactive
  • Scanning state while searching for valid entities
  • Found state to confirm a detected target
  • Menu state for actionable options
  • Automatic reset/cleanup when leaving or closing target mode

💎 Diamond UI Layout

A fully custom 9-slot diamond interface designed for quick decision-making:

  • Centered primary eye indicator for target focus
  • Up to 8 dynamic outer action cards generated from live option data
  • Stable positional layout for muscle-memory-friendly interaction
  • Strong hover and active-state highlighting for instant visual feedback

🎮 Input & Interaction

Fast and simple controls for roleplay-friendly gameplay:

  • Click-based option selection when menu is active
  • ESC key instantly closes the target UI
  • Selectable options are sent directly through NUI callback flow
  • UI closes immediately after selection for a clean handoff

🔢 Smart Option Presentation

Action cards are formatted for readability and consistency:

  • Number badges auto-assigned to each option (1 to 8)
  • Option labels are constrained in the card for cleaner display
  • Uppercase bold styling keeps actions legible at a glance
  • Consistent spacing/alignment across icon and text cards

🎨 Visual Style Upgrade

A distinctive, game-first visual direction:

  • Rotated diamond card architecture with layered depth
  • Glass-like dark panels with blue accent highlights
  • Custom Bebas Neue Pro typography across the interface
  • Background and overlay treatment tuned for in-game contrast

🔌 NUI Integration Improvements

Frontend event wiring is structured and reliable:

  • Dedicated listeners for open, close, found, valid, and leave events
  • Safe option-array handling before render
  • Direct callback dispatch for select and close actions
  • Clean separation between UI rendering and NUI messaging utilities