# Full Configuration Breakdown

### 🌍 Language Configuration

```lua
-- Set the default language for notifications
Config.Language = 'en' -- Available options: 'en', 'de', 'es', 'fr', 'it'
```

#### Adding New Languages

To add a new language, edit the `shared/translation.lua` file and extend the `Translations.Languages` and `Translations.Messages` sections.

***

### 📢 Notification Configuration

```lua
-- Default display duration for notifications (in milliseconds)
Config.DefaultDuration = 5000
```

***

### 🛠️ Framework Configuration

```lua
-- Choose the framework to use ('auto', 'esx', or 'qbcore')
Config.Framework = 'esx'

-- Set to 'true' for older ESX versions that use TriggerEvent instead of Export
Config.UseOldESX = false
```

***

### ⏱️ Cooldown Configuration

```lua
-- Global cooldown for automatic announcements (in seconds)
Config.AnnounceCooldown = 60

-- Cooldown for admin announcements (in seconds)
Config.AdminAnnounceCooldown = 30

-- Cooldown for internal admin announcements (in seconds)
Config.AdminInternalAnnounceCooldown = 15

-- Cooldown for job announcements (in seconds)
Config.JobAnnounceCooldown = 120

-- Cooldown for internal job announcements (in seconds)
Config.JobInternalAnnounceCooldown = 30

-- Cooldown for player-specific announcements (in seconds)
Config.PlayerAnnounceCooldown = 20
```

***

### 🔄 Automatic Announcement Configuration

```lua
-- Enable or disable automatic announcements
Config.EnableAutoAnnounces = true

-- Interval between automatic announcements (in seconds)
Config.AutoAnnounceInterval = 6000

-- List of automatic announcement messages
Config.AutoAnnounces = {
    {message = "Welcome to our server! Have fun playing.", type = "info", duration = 8000},
    {message = "Visit our Discord server for more information.", type = "info", duration = 6000},
    {message = "Need help? Contact an admin with /report.", type = "warning", duration = 7000},
    {message = "Respect other players and follow the rules.", type = "error", duration = 9000},
    {message = "Don't forget to read our server rules!", type = "success", duration = 5000},
}
```

***

### 🔒 Admin Permissions Configuration

```lua
-- Admin groups that can send announcements to ALL players
Config.AdminAnnounceAllPerms = {
    ['superadmin'] = true,
    ['admin'] = true,
    ['moderator'] = true,
    ['supporter'] = true
}

-- Admin groups that can send announcements ONLY to team members
Config.AdminAnnounceTeamPerms = {
    ['superadmin'] = true,
    ['admin'] = true,
    ['moderator'] = true,
    ['supporter'] = true
}

-- Admin groups that can send announcements to specific players
Config.AdminAnnouncePlayerPerms = {
    ['superadmin'] = true,
    ['admin'] = true,
    ['moderator'] = true,
    ['supporter'] = true
}
```

***

### 👮‍♂️ Job Announcements Configuration

```lua
-- Jobs that can send announcements to all players
Config.JobsWithAnnouncePerms = {
    ['police'] = true,
    ['ambulance'] = true,
    ['mechanic'] = true,
    ['taxi'] = true,
    ['reporter'] = true,
}

-- Jobs that are primarily intended for internal communication
Config.JobsWithInternalAnnounce = {
    ['police'] = true,
    ['ambulance'] = true,
    ['mechanic'] = true,
    ['taxi'] = true,
    ['reporter'] = true,
}

-- Minimum job ranks required for public announcements
Config.JobAnnounceLevels = {
    ['police'] = 3,      -- From rank 3 (e.g., Sergeant)
    ['ambulance'] = 2,   -- From rank 2 (e.g., Paramedic)
    ['mechanic'] = 1,    -- Any mechanic
    ['taxi'] = 2,        -- Only taxi managers (rank 2)
    ['reporter'] = 3,    -- Only senior reporters
}

-- Minimum job ranks required for internal announcements
Config.JobInternalAnnounceLevels = {
    ['police'] = 2,      -- From rank 2 (e.g., Officer)
    ['ambulance'] = 1,   -- Any medic
    ['mechanic'] = 0,    -- Any mechanic
    ['taxi'] = 1,        -- Taxi drivers from rank 1
    ['reporter'] = 1,    -- Reporters from rank 1
}
```

***

### 🔄 TxAdmin Integration

```lua
-- Enable or disable TxAdmin integration
Config.EnableTxAdminIntegration = true

-- Configuration for displaying TxAdmin announcements
Config.TxAdminConfig = {
    -- General TxAdmin announcement configuration
    announce = {
        enabled = true,             -- Enable/disable TxAdmin general announcements
        prefix = "[TXADMIN]",       -- Prefix for TxAdmin announcements
        duration = 10000,           -- Display duration in milliseconds
    },
    
    -- Restart announcement configuration
    scheduledRestart = {
        enabled = true,              -- Enable/disable TxAdmin restart announcements
        prefix = "[SERVER RESTART]", -- Prefix for restart announcements
        duration = 12000,            -- Display duration in milliseconds
        showCountdown = true,        -- Whether to show countdown in the message
        message = "Server will restart in %d minutes"  -- Message format for restart announcement
    },
    
    -- Warning announcement configuration
    warnings = {
        enabled = true,              -- Enable/disable TxAdmin warning announcements
        prefix = "[ADMIN WARNING]",  -- Prefix for warning announcements
        duration = 15000,            -- Display duration in milliseconds
        message = "You have been warned by %s. Reason: %s", -- Format for the warning message (admin, reason) - direct to player
        staffMessage = "Player %s was warned by %s. Reason: %s", -- Format for staff notification
        notifyStaff = true           -- Whether to notify all staff members about warnings
    },
    
    -- Direct message configuration
    directMessage = {
        enabled = true,              -- Enable/disable TxAdmin direct messages
        prefix = "[ADMIN DM]",       -- Prefix for direct messages
        duration = 10000,            -- Display duration in milliseconds
        notifyStaff = true,          -- Whether to notify all staff members about direct messages
        message = "%s", -- Format for direct message to player (just the message)
        staffMessage = "Admin %s sent DM to %s: %s" -- Format for staff notification (sender, target, message)
    }
}
```

***

### 📤 Discord Logging

```lua
Config.DiscordLogs = {
    enabled = false,                                  -- Enables/Disables Discord logging in general
    forceDisableIfNoHTTP = false,                     -- Don't touch
    -- Discord Webhook URLs for different announcement types
    webhooks = {
        admin = "https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE",       -- Admin announcements to all
        team = "https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE",        -- Team-internal announcements
        player = "https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE",      -- Player-specific announcements
        job = "https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE",         -- Job announcements to all
        jobInternal = "https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE", -- Job-internal announcements
        auto = "https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE",        -- Automatic announcements
        txadmin = "https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE"      -- TxAdmin announcements
    },
    
    -- Bot name displayed in Discord
    botName = "X_HUD_Announce",
    
    -- Avatar URL for the bot (optional)
    botAvatar = "https://i.imgur.com/.png",    -- URL to an image for the bot avatar
    
    -- Embed colors for different message types (decimal value of the color)
    colors = {
        admin = 15105570,       -- Orange
        team = 16727113,        -- Red
        player = 16766720,      -- Gold
        job = 3447003,          -- Blue
        jobInternal = 2067276,  -- Dark Blue
        auto = 5763719,         -- Green
        txadmin = 10181046,     -- Purple
        
        -- Colors for different notification types
        info = 3447003,         -- Blue
        success = 5763719,      -- Green
        error = 15548997,       -- Red
        warning = 16776960      -- Yellow
    },
    
    -- General settings
    serverName = "Your Server Name",   -- Name of the server displayed in logs
    includeTimestamp = true,          -- Add timestamp to embed
    
    -- Content displayed in logs
    logContent = {
        showPlayerId = true,          -- Shows player ID in logs
        showPlayerIdentifiers = false, -- Shows player identifiers (steam, license, etc.) in logs
        includeType = true            -- Shows the type of announcement in the log
    }
}
```

***

### 🎨 Notification Appearance and Styles

#### Notification Types

```lua
Config.notificationTypes = {
    'info': {
        accentColor: '#3498db',   -- Blue
        icon: {
            fontawesome: 'fas fa-info-circle',
            ionicons: 'information-circle'
        }
    },
    'success': {
        accentColor: '#2ecc71',   -- Green
        icon: {
            fontawesome: 'fas fa-check-circle',
            ionicons: 'checkmark-circle'
        }
    },
    'error': {
        accentColor: '#e74c3c',   -- Red
        icon: {
            fontawesome: 'fas fa-times-circle',
            ionicons: 'close-circle'
        }
    },
    'warning': {
        accentColor: '#f39c12',   -- Orange
        icon: {
            fontawesome: 'fas fa-exclamation-triangle',
            ionicons: 'warning'
        }
    },
    'default': {
        accentColor: '#7f8c8d',   -- Light Grey
        icon: {
            fontawesome: 'fas fa-bell',
            ionicons: 'notifications'
        }
    },
    'txadminrestart': {
        accentColor: '#c0392b',   -- Darker Red for restart warnings
        icon: {
            fontawesome: 'fas fa-power-off',
            ionicons: 'power'
        }
    },
    'txadminwarning': {
        accentColor: '#d35400',   -- Dark Orange for admin warnings
        icon: {
            fontawesome: 'fas fa-exclamation-circle',
            ionicons: 'alert-circle'
        }
    },
    'txadmindm': {
        accentColor: '#8e44ad',   -- Purple for direct messages
        icon: {
            fontawesome: 'fas fa-comment',
            ionicons: 'chatbubble-ellipses'
        }
    },
    'txadminannounce': {
        accentColor: '#2980b9',   -- Blue for general TxAdmin announcements
        icon: {
            fontawesome: 'fas fa-bullhorn',
            ionicons: 'megaphone'
        }
    },
    'police': {
        accentColor: '#1a237e',   -- Dark Blue
        icon: {
            fontawesome: 'fas fa-shield-alt',
            ionicons: 'shield'
        }
    },
    'ambulance': {
        accentColor: '#b71c1c',   -- Dark Red
        icon: {
            fontawesome: 'fas fa-ambulance',
            ionicons: 'medkit'
        }
    },
    'mechanic': {
        accentColor: '#424242',   -- Dark Grey
        icon: {
            fontawesome: 'fas fa-wrench',
            ionicons: 'construct'
        }
    }
}
```

#### Sound Settings

```lua
Config.sound = {
    enabled = true,              -- Enable or disable notification sounds
    volume = 0.5,                -- Volume from 0.0 to 1.0
    sounds = {
        'adminannounce': 'sound1.mp3',      -- Sound for admin public announcements
        'admininternal': 'sound2.mp3',  -- Sound for admin internal team announcements
        'jobannounce': 'sound1.mp3',        -- Sound for job public announcements
        'jobinternal': 'sound2.mp3',    -- Sound for job internal announcements
        'playerannounce': 'sound3.mp3',     -- Sound for player-specific announcements
        'txadmin': 'sound4.mp3',            -- Sound for TxAdmin announcements
        'txadminrestart': 'sound5.mp3',     -- Sound for TxAdmin restart announcements
        'txadminwarning': 'sound5.mp3',     -- Sound for TxAdmin warning announcements
        'txadmindm': 'sound5.mp3',          -- Sound for TxAdmin direct messages
        'autoannounce': 'sound1.mp3',       -- Sound for automatic server announcements
        'announce': 'sound1.mp3',           -- Sound for general announcements (fallback)
        'notification': 'sound5.mp3'         -- Sound for normal notifications (fallback)
    }
}
```

***

### 🔄 Feature Toggles

```lua
Config.Features = {
    adminAnnounce = true,           -- Admin announcements to all players
    adminInternalAnnounce = true,   -- Admin announcements only for team members
    jobAnnounce = true,             -- Job announcements to all players
    jobInternalAnnounce = true,     -- Job announcements only for members of the same job
    autoAnnounce = true,            -- Automatic announcements
    txAdminIntegration = true,      -- TxAdmin integration
    testCommand = true,             -- Test command for displaying different message types
    showAdminName = true,           -- Shows the admin's name in admin announcements
    showAdminGroup = true,          -- Shows the admin's group in admin announcements
    useRoleplayNames = true         -- Uses RP names instead of Steam names in job announcements
}
```

***

### 📊 Notification Duration

```lua
Config.AdminDuration = 7000       -- Display duration for admin announcements
Config.TeamDuration = 6000        -- Display duration for team announcements
Config.PlayerDuration = 10000     -- Display duration for player-specific announcements
```

***

### 📊 Notification Prefixes

```lua
-- Prefix for admin announcements to all players
Config.GetAdminPrefix = function(adminName, adminGroup, showName, showGroup)
    local prefix = "[ADMIN"
    if showGroup then
        prefix = prefix .. " " .. adminGroup:upper()
    end
    if showName then
        prefix = prefix .. ": " .. adminName
    end
    prefix = prefix .. "]"
    return prefix
end

-- Prefix for admin announcements to team members
Config.GetTeamPrefix = function(adminName, adminGroup)
    return "[TEAM INTERNAL " .. adminGroup:upper() .. ": " .. adminName .. "]"
end

-- Prefix for admin announcements to specific players
Config.GetPlayerAnnouncePrefix = function(adminName, adminGroup, showName, showGroup)
    local prefix = "[ADMIN"
    if showGroup then
        prefix = prefix .. " " .. adminGroup:upper()
    end
    if showName then
        prefix = prefix .. ": " .. adminName
    end
    prefix = prefix .. " → YOU]"
    return
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fiveworld.gitbook.io/fiveworld-docs/x_hud_announce/full-configuration-breakdown.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
