Configuration
NN-HUD Configuration Guide
Overview
The NN-HUD configuration file (config.lua) provides comprehensive control over the HUD system's behavior, appearance, and functionality. This guide will walk you through all available configuration options and their impact on your FiveM server.
Table of Contents
Framework Selection
General Settings
Stress System Configuration
Whitelist Configuration
Vehicle Class Stress Settings
Stress Effect Configuration
HUD Display Settings
Resource Integration
Minimap Configuration
Update Intervals
UI Theme Settings
Key Bindings
Debug Mode
Framework Selection
Description: Specifies which framework your server uses.
Options:
'qb'- QBCore Framework'esx'- ESX Framework
Example:
General Settings
Description: Core system settings that control basic HUD functionality.
Options:
UseMPH- Speed display unit (MPH/KPH)DisableStress- Completely disable stress systemDisableStamina- Completely disable stamina systemDisableOxygen- Completely disable oxygen systemUseDistanceInMiles- GPS distance unit (miles/kilometers)
Stress System Configuration
Description: Controls how the stress system behaves and when stress is gained.
Parameters:
StressChance- Probability of gaining stress when shooting (0.0 to 1.0)MinimumStress- Minimum stress level required for visual effectsMinimumSpeedUnbuckled- Speed threshold for stress gain without seatbeltMinimumSpeed- Speed threshold for stress gain with seatbelt
Example:
Whitelist Configuration
Whitelisted Jobs
Description: Jobs that are exempt from stress gain and certain HUD restrictions.
Usage: Add job names as keys with true values to whitelist them.
Example:
Whitelisted Weapons
Description: Weapons that won't trigger armed status or cause stress gain.
Usage: Add weapon hashes as keys with true values to whitelist them.
Example:
Vehicle Class Stress Settings
Description: Controls which vehicle classes can cause stress when speeding.
Vehicle Classes:
0-12- Ground vehicles (can cause stress)13-21- Special vehicles (no stress gain)
Example:
Stress Effect Configuration
Stress Intensity Settings
Description: Defines stress levels and their corresponding visual effect intensity.
Parameters:
min- Minimum stress level for this tiermax- Maximum stress level for this tierintensity- Visual effect intensity (higher = more intense)
Stress Effect Intervals
Description: Controls how often stress effects trigger at different stress levels.
Parameters:
min/max- Stress level rangetimeout- Time interval between effects (in milliseconds)
HUD Display Settings
Description: Controls which HUD elements are displayed and their behavior.
Options:
showHealth- Display health barshowArmor- Display armor barshowHunger- Display hunger barshowThirst- Display thirst barshowStress- Display stress barshowOxygen- Display oxygen barshowVoice- Display voice indicatorshowSpeed- Display speedometershowFuel- Display fuel gaugeshowEngine- Display engine healthshowSeatbelt- Display seatbelt statusshowCruise- Display cruise control statusanimateStatusBars- Enable smooth animations
Example:
Resource Integration
Description: Specifies which resources to integrate with for fuel and voice functionality.
Common Options:
Fuel:
'LegacyFuel','ps-fuel','ox_fuel'Voice:
'pma-voice','mumble-voip','toko-voip'
Minimap Configuration
Description: Controls minimap behavior and appearance.
Options:
MinimapWalking- Show minimap when on footMinimapTexture- Custom minimap texture (requires resource)
Update Intervals
Description: Controls how frequently different HUD elements update.
Parameters:
playerStats- Player health, armor, hunger, thirst updates (ms)vehicleStats- Vehicle speed, fuel, engine updates (ms)stress- Stress system checks (ms)fuel- Fuel level checks (ms)
Performance Tips:
Lower values = smoother updates but higher CPU usage
Higher values = better performance but less responsive HUD
UI Theme Settings
Description: Controls the visual appearance of the HUD.
Color Options:
primaryColor- Main accent colorsuccessColor- Success/good status colordangerColor- Danger/warning colorbackgroundColor- HUD background colortextColor- Text coloropacity- Overall transparency (0.0 to 1.0)
Example Themes:
Key Bindings
Description: Defines key bindings for HUD-related functions.
Available Functions:
seatbelt- Toggle seatbeltcruise- Toggle cruise controlengine- Toggle engine
Example:
Debug Mode
Description: Enables debug mode for troubleshooting.
Usage:
true- Enable debug messages in consolefalse- Disable debug messages (recommended for production)
Implementation Tips
Performance Optimization
Adjust Update Intervals:
Disable Unused Features:
Optimize Stress System:
Customization Examples
Realistic Police Server:
Casual Gaming Server:
Racing Server:
Troubleshooting
Common Issues
HUD Not Showing:
Check if all required resources are started
Verify framework selection is correct
Ensure player has required permissions
Performance Issues:
Increase update intervals
Disable unused HUD elements
Reduce stress effect intensity
Resource Conflicts:
Ensure only one HUD resource is active
Check for conflicting key bindings
Verify resource load order
Support
For additional support or feature requests, please refer to the resource documentation or contact the development team.
This documentation covers all configuration options available in the NN-HUD system. Adjust settings according to your server's specific needs and performance requirements.
Last updated