⚙️Full Configuration Breakdown

🔹config.lua (Server-Side)

🔧 Core Settings

-- Notification duration (default: 5 seconds)  
Config.DefaultDuration = 5000 -- in milliseconds  

-- Framework detection (supports ESX/QBCore/standalone)  
Config.Framework = {  
    AutoDetect = true,          -- Automatically detect ESX/QBCore  
    Type = "newesx",            -- Manual override: "oldesx", "newesx", "qbcore"  
    ESXExport = "es_extended",  -- ESX resource name  
    QBCoreResource = "qb-core"  -- QBCore resource name  
}  

💬 Team Chat

Config.TeamChat = {  
    Enabled = true,  
    Command = "tc",               -- Command: /tc [message]  
    AllowedGroups = {             -- Staff groups with access  
        ["admin"] = true,  
        ["mod"] = true  
    },  
    ShowSteamID = true,           -- Log SteamID to deter trolling  
    Cooldown = 3000,              -- 3-second delay between messages  
    Prefix = "[STAFF]"            -- Chat message prefix  
}  

👮 Job Chat

Config.JobChat = {  
    Enabled = true,  
    Command = "jc",               -- Command: /jc [message]  
    AllowedJobs = {  
        ["police"] = {  
            enabled = true,  
            minGrade = 0,         -- Minimum rank (Cadet)  
            maxGrade = 7          -- Maximum rank (Chief)  
        },  
        ["ambulance"] = { ... }   -- Same structure for EMS/mechanic  
    },  
    RankPrefixes = {              -- Custom rank labels (e.g., "Chief")  
        ["police"] = {  
            [0] = "Cadet",  
            [7] = "Chief"  
        }  
    }  
}  

📩 Direct Messages

Config.DirectMessage = {  
    Enabled = true,  
    Command = "dm",               -- Command: /dm [playerID] [message]  
    AllowedGroups = { ["admin"] = true },  
    Cooldown = 5000               -- 5-second delay between DMs  
}  

🔸 html/config.js (Client-Side UI)

📍 Position & Layout

// Choose from 9 presets:  
positionPreset: "top-left",  
// Options:  
// top-left, top, top-right, middle-left, middle, middle-right, bottom-left, bottom, bottom-right  

// Custom width/alignment:  
positions: {  
    "top-left": {  
        top: "2vh",          -- Distance from top  
        left: "2vw",         -- Distance from left  
        maxWidth: "250px"    -- Notification width  
    }  
}  

🎨 Appearance

appearance: {  
    transparency: 0.75,       -- 0 (transparent) to 1 (opaque)  
    backgroundColor: "#2a2a2a",  
    realGlassEffect: {  
        enabled: true,        -- Blur effect  
        blurStrength: 3.0,    -- Intensity (0-20)  
        performanceMode: false-- Reduce blur quality for FPS boost  
    },  
    font: {  
        family: "Poppins",    -- Custom font (7 options preloaded)  
        size: "12px"  
    }  
}  

✨ Animations

animation: {  
    type: "slide",           -- Options: slide/fade/scale/flip  
    direction: "left",       -- Slide direction  
    duration: 500            -- Animation speed (ms)  
}  

🔔 Notification Types

notificationTypes: {  
    police: {  
        accentColor: "#1a237e",  -- Dark blue  
        icon: "fas fa-shield-alt"  
    },  
    error: {  
        accentColor: "#e74c3c",  -- Red  
        icon: "fas fa-times-circle"  
    }  
    // Add custom types here!  
}  

3. translation.lua (Multi-Language)

Translation.Default = "en"  -- Default language (en/de/es/it/fr)  

-- Example: Add Dutch support  
Translation.Languages["nl"] = "Dutch"  
Translation.Strings["nl"] = {  
    ["no_permission"] = "Geen toestemming...",  
    // Add all other strings  
}  

🔧 Common Config Scenarios

Change Notification Position

  1. Edit html/config.js

  2. Set positionPreset: "bottom-right"

Add a New Job Chat

  1. Edit config.lua under Config.JobChat.AllowedJobs:

["judge"] = {  
    enabled = true,  
    minGrade = 0,  
    maxGrade = 3  
}  

Disable Glass Effect for Low-End PCs

realGlassEffect: {  
    enabled: false  
}  

🚦 Troubleshooting

  • Notifications Not Showing?

    1. Check ensure X_HUD_Notify in server.cfg.

    2. Verify no conflicts with other HUD scripts.

  • Chat Commands Not Working?

    1. Ensure Config.Framework.AutoDetect matches your framework.

    2. Check group/job names in config.lua.

Need Help? Join FiveWorld Discord for config reviews and optimization! 🚗💨

Last updated