💾X_HUD_CallPlayer
🌟 Overview
X_HUD_CallPlayer
provides a modern and efficient way for admins to communicate with players directly through in-game notifications. The system features a glass UI effect, multilingual support, and advanced logging capabilities. It integrates seamlessly with popular frameworks like ESX and QB-Core and supports detailed Discord webhooks for admin actions.
✨ Features
Admin Communication: Send direct messages to players using simple commands.
Modern UI: Glass effect with customizable colors, fonts, and layout.
Framework Support: Compatible with ESX and QB-Core.
Multilingual Support: English, German, French, Italian, Spanish, and easy expansion.
Discord Webhooks: Detailed logs with player identifiers (Steam, License, Discord, IP, etc.).
TxAdmin Integration: Handle warnings and direct messages from TxAdmin.
Customizable Notifications: Adjust the appearance of notifications via
html/config.js
.
🛠️ Installation
Download the Script:
Download the script from the Tebex Store or GitHub.
Extract the Folder:
Extract the downloaded folder to your FiveM
resources
directory.
Update
server.cfg
:Add
ensure X_HUD_CallPlayer
to yourserver.cfg
file.
Restart Your Server:
Restart your server to load the new resource.
📖 Usage
Admin Commands
/callplayer [ID] [Message]
: Sends a message to a specific player.
Example Usage
/callplayer 1 "Please report to the admin base for assistance."
⚙️ Configuration
Server-Side Configuration (config.lua
)
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
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
TxAdmin Integration
Config.UseTxAdminWarnings = true -- Enable txAdmin warning event handling
Config.UseTxAdminDirectMessages = true -- Enable txAdmin direct message event handling
🎨 UI Customization (html/config.js
)
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%)
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)"
}
}
Font Settings
fontFamily: "Poppins", // Font for UI (available options: Poppins, Montserrat, Pacifico, Kanit, Gidole, Dancing Script)
useCustomFonts: true, // Enable custom fonts
📤 Discord Webhook Setup
Features of Discord Logs
Player Identifiers: Steam, License, Discord, FiveM, IP address, and more.
RP Names: If available through the framework.
Detailed Information: Player jobs, money, status, server info, online time, location, and date/time.
Configuration in config.lua
config.lua
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
🔄 TxAdmin Integration
Configuration
Config.UseTxAdminWarnings = true -- Enable txAdmin warning event handling
Config.UseTxAdminDirectMessages = true -- Enable txAdmin direct message event handling
🔄 Troubleshooting
Common Issues
Notification Not Appearing:
Ensure the script is properly loaded and enabled in
server.cfg
.Check for typos in the command name or event names.
Verify that the player ID is correct.
Discord Logs Not Working:
Ensure the Discord webhook URL is correct.
Check if the Discord bot has the necessary permissions.
Verify that
Config.UseDiscordLogs
is set totrue
.
TxAdmin Integration Not Working:
Ensure TxAdmin is properly installed and configured.
Verify that
Config.UseTxAdminWarnings
andConfig.UseTxAdminDirectMessages
are set totrue
.
📥 Download & Support
Tebex Store: Download Link
Discord Support: Join Discord
Last updated