⚙️Full Configuration Breakdown

🌍 Server-Side Configuration (config.lua)

Language Setting

Config.Language = "en" -- Available: "en", "de", "fr", "it", "es"

Command Settings

Config.CommandName = "callplayer" -- Name of the command
Config.DefaultMessage = "An admin wants to speak with you in support!" -- Default message if none is specified
Config.CommandCooldown = 30 -- Cooldown in seconds between command uses (per admin)

Permission Settings

Config.PermissionGroups = { -- Groups that can use the command
    "admin",
    "mod", 
    "superadmin",
    "god"
}

Framework Settings

Config.Framework = "auto" -- "auto", "esx" or "qbcore"
Config.UseNewESX = true -- true for Export (new ESX), false for TriggerEvent (old ESX)

Discord Webhook

Config.UseDiscordLogs = true -- Enable Discord logs
Config.DiscordWebhook = "https://discord.com/api/webhooks/..." -- Discord Webhook URL
Config.DiscordBotName = "Call Player Logs" -- Name of the Discord bot
Config.DiscordColor = 15158332 -- Red (equivalent to FF0000 in Hex)
Config.DiscordFooterText = "X_HUD_CallPlayer" -- Text in the embed footer
Config.DiscordAvatarURL = "" -- Avatar URL for the Discord bot
Config.DiscordTitle = "Admin Call Player System" -- Title of the embed
Config.DiscordDescription = "Admin called a player" -- Description of the embed
Config.DiscordShowTimestamp = true -- Show timestamp in footer

Discord Log Detail Settings

Config.DiscordShowPlayerJobs = true -- Show player jobs
Config.DiscordShowPlayerMoney = true -- Show player finances
Config.DiscordShowPlayerStatus = true -- Show status (health, etc.)
Config.DiscordShowServerInfo = true -- Show server information
Config.DiscordShowOnlineTime = true -- Show player online time
Config.DiscordShowLocation = true -- Show player coordinates
Config.DiscordShowDateTime = true -- Show local date and time
Config.DiscordUseEmojis = true -- Use emojis in field names
Config.DiscordExpandedIdentifiers = true -- Show detailed player identifiers
Config.DiscordSeparateFields = true -- Split information into separate fields

TxAdmin Integration

Config.UseTxAdminWarnings = true -- Enable txAdmin warning event handling
Config.UseTxAdminDirectMessages = true -- Enable txAdmin direct message event handling

Notification Settings

Config.Notify = function(source, type, message, duration)
    if GetResourceState('X_HUD_Notify') ~= 'missing' then
        exports['X_HUD_Notify']:NotifyPlayer(source, message, type, duration or 5000)
    elseif GetResourceState('esx_notify') ~= 'missing' then
        TriggerClientEvent('esx:showNotification', source, message)
    elseif GetResourceState('ox_lib') ~= 'missing' then
        TriggerClientEvent('ox_lib:notify', source, {
            type = type,
            description = message,
            duration = duration or 5000
        })
    elseif GetResourceState('qb-core') ~= 'missing' then
        TriggerClientEvent('QBCore:Notify', source, message, type, duration or 5000)
    else
        local colors = {
            error = {255, 0, 0},
            success = {0, 255, 0},
            info = {0, 0, 255}
        }
        TriggerClientEvent('chat:addMessage', source, {
            color = colors[type] or {255, 255, 255},
            multiline = true,
            args = {"System", message}
        })
    end
end

🎨 Frontend UI Configuration (html/config.js)

Notification Duration and Effects

notificationDuration: 12500, // Duration of notification in ms
fadeOutTime: 1000, // Time to fade out in ms

Position Settings

windowPositionY: 5, // Position of window from bottom screen edge in %
iconOffsetY: 40, // Distance of icon from window in px
verticalPosition: 5, // Vertical position for window in %
iconPositionOffset: 50, // Distance between icon and window in px

Style Settings

glassBlurStrength: 2.0, // Strength of glass effect
glassTransparency: 0.4, // Transparency of glass effect
borderWidth: 3, // Width of border in px
borderColor: "rgba(87, 87, 87, 0.5)", // Color of border
windowGlowStrength: "0 0 10px", // Strength of window glow effect
titleGlowStrength: "0 0 3px", // Strength of title glow effect
uiScale: 0.9, // Scale factor for UI size (1.0 = 100%)

Duration Bar Settings

durationBarHeight: 5, // Height of progress bar in px
durationBarGlow: true, // Enable glow effect for progress bar
durationBarGlowStrength: "0 0 8px", // Strength of progress bar glow effect

Notification Types

notificationTypes: {
    default: {
        icon: "warning", // Default icon (ionicons name)
        label: "", // No label for default messages
        titlePrefix: "Message from:", // Title prefix for default messages
        
        // Colors for this notification type
        accentColor: "rgba(255, 0, 0, 1.0)", // Main color for UI elements (Red)
        textColor: "rgba(255, 255, 255, 1.0)", // Text color
        shadowColor: "rgba(0, 0, 0, 0.5)", // Shadow color
        windowGlowColor: "rgba(255, 0, 0, 1.0)", // Color of window glow effect
        titleGlowColor: "rgba(255, 0, 0, 1.0)", // Color of title glow effect
        alertIconColor: "rgba(255, 0, 0, 1.0)", // Color of icon
        durationBarGlowColor: "rgba(255, 0, 0, 0.6)" // Color of progress bar
    },
    warn: {
        icon: "warning", // Warning icon (ionicons name)
        label: "WARNING",
        titlePrefix: "Warning from:", // Title prefix for warnings
        
        // Colors for this notification type
        accentColor: "rgba(255, 165, 0, 1.0)", // Main color for UI elements (Orange)
        textColor: "rgba(255, 255, 255, 1.0)", // Text color
        shadowColor: "rgba(0, 0, 0, 0.5)", // Shadow color
        windowGlowColor: "rgba(255, 165, 0, 1.0)", // Color of window glow effect
        titleGlowColor: "rgba(255, 165, 0, 1.0)", // Color of title glow effect
        alertIconColor: "rgba(255, 165, 0, 1.0)", // Color of icon
        durationBarGlowColor: "rgba(255, 165, 0, 0.6)" // Color of progress bar
    },
    dm: {
        icon: "information-circle",
        label: "DM",
        titlePrefix: "Message from:",
        
        accentColor: "rgba(100, 149, 237, 1.0)",
        textColor: "rgba(255, 255, 255, 1.0)", 
        shadowColor: "rgba(0, 0, 0, 0.5)",
        windowGlowColor: "rgba(100, 149, 237, 1.0)",
        titleGlowColor: "rgba(100, 149, 237, 1.0)",
        alertIconColor: "rgba(100, 149, 237, 1.0)", 
        durationBarGlowColor: "rgba(100, 149, 237, 0.6)"
    }
}

Screen Edge Shadow

screenEdgeShadowEnabled: true, // Enable screen edge shadow
screenEdgeShadowColor: "rgba(0, 0, 0, 0.9)", // Color of screen edge shadow
screenEdgeShadowSize: "0 0 150px 50px", // Size of screen edge shadow

Font Settings

fontFamily: "Poppins", // Font for UI (available options: Poppins, Montserrat, Pacifico, Kanit, Gidole, Dancing Script)
useCustomFonts: true, // Enable custom fonts

Alert Icon Settings

showAlertIcon: true, // Show exclamation mark
alertIconSize: 45, // Size of exclamation mark in px
alertIconOpacity: 0.8, // Transparency of exclamation mark (0.0 - 1.0)
alertIconGlow: true, // Should the icon have a glow effect?
alertIconGlowStrength: "0 0 3px", // Strength of icon glow effect

Text Settings

titleFontSize: 17, // Font size of title in px
messageFontSize: 15 // Font size of message in px

🔄 Usage Examples

Basic Usage

-- Send a message to a player
/callplayer 1 "Please report to the admin base for assistance."

Trigger via Event

TriggerEvent('X_HUD_CallPlayer:callPlayer', 1, "Please report to the admin base for assistance.")

Last updated