af-nametag is a highly optimized and feature-rich nametag system designed for FiveM servers. Built with performance in mind, this resource uses statebags and native text rendering to provide smooth and efficient nametag displays even on high-population servers.
Features
Core Features
Multi-Framework Support: Works seamlessly with QB-Core, QBox, and ESX frameworks (auto-detection available)
Performance Optimized: Uses statebags for efficient data synchronization and native rendering methods
Raycast Line-of-Sight: Only displays nametags when players are visible (no wallhacks)
Distance-Based Rendering: Configurable maximum view distance to reduce overhead
Customizable Colors: Full RGBA color customization for all elements
Advanced Features
Damage Flash System: Nametags flash red when a player takes damage
AFK Detection: Automatically detects and marks AFK players with a different color
Player ID Toggle: Command to show/hide player IDs above nametags
Enemy Marking System: Mark specific players with a different color (persistent across restarts via JSON storage)
Text Outline: Optional outline for better visibility in all conditions
Underage Indicator: Automatically shows (M) marker for minor characters
Mask System
Dynamic Masking: Players can wear masks to hide their identity
Inventory Integration: Uses mask items from your inventory system (ox_inventory, qb-inventory, etc.)
Custom Mask Command: /wearmask to toggle masks on/off
Masked Name Display: Shows custom name (e.g., “Masked”) when wearing a mask
Force ID Display: Optionally show IDs even when masked
Smooth Animations: Realistic mask putting on/taking off animations
Commands
/nametagid - Toggle display of player IDs (configurable)
/markenemy - Mark a player as an enemy (changes their nametag color)
/wearmask - Put on/remove mask (requires mask item in inventory)
Configuration
Extensive configuration options available:
Display distances and offsets
Font types and scales
Color schemes (text, damage, ID, enemy, AFK, outline)
Update intervals and raycast settings
Toggle features on/off
Mask system customization
AFK detection thresholds
Installation
Download and extract af-nametag to your resources folder