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 system

  • DisableStamina - Completely disable stamina system

  • DisableOxygen - Completely disable oxygen system

  • UseDistanceInMiles - 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 effects

  • MinimumSpeedUnbuckled - Speed threshold for stress gain without seatbelt

  • MinimumSpeed - 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 tier

  • max - Maximum stress level for this tier

  • intensity - 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 range

  • timeout - Time interval between effects (in milliseconds)

HUD Display Settings

Description: Controls which HUD elements are displayed and their behavior.

Options:

  • showHealth - Display health bar

  • showArmor - Display armor bar

  • showHunger - Display hunger bar

  • showThirst - Display thirst bar

  • showStress - Display stress bar

  • showOxygen - Display oxygen bar

  • showVoice - Display voice indicator

  • showSpeed - Display speedometer

  • showFuel - Display fuel gauge

  • showEngine - Display engine health

  • showSeatbelt - Display seatbelt status

  • showCruise - Display cruise control status

  • animateStatusBars - 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 foot

  • MinimapTexture - 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 color

  • successColor - Success/good status color

  • dangerColor - Danger/warning color

  • backgroundColor - HUD background color

  • textColor - Text color

  • opacity - Overall transparency (0.0 to 1.0)

Example Themes:

Key Bindings

Description: Defines key bindings for HUD-related functions.

Available Functions:

  • seatbelt - Toggle seatbelt

  • cruise - Toggle cruise control

  • engine - Toggle engine

Example:

Debug Mode

Description: Enables debug mode for troubleshooting.

Usage:

  • true - Enable debug messages in console

  • false - Disable debug messages (recommended for production)

Implementation Tips

Performance Optimization

  1. Adjust Update Intervals:

  2. Disable Unused Features:

  3. Optimize Stress System:

Customization Examples

Realistic Police Server:

Casual Gaming Server:

Racing Server:

Troubleshooting

Common Issues

  1. HUD Not Showing:

    • Check if all required resources are started

    • Verify framework selection is correct

    • Ensure player has required permissions

  2. Performance Issues:

    • Increase update intervals

    • Disable unused HUD elements

    • Reduce stress effect intensity

  3. 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