๐พX_HUD_Announce
๐ Overview
X_HUD_Announce is designed to enhance the communication system on your FiveM server by providing a flexible and powerful way to manage announcements and notifications. It supports multiple languages, integrates with popular frameworks like ESX and QBCore, and offers extensive customization options.
โจ Features
๐ Multilingual Support: Supports English, German, Spanish, French, and Italian.
๐ฃ Admin Announcements: Send global and internal announcements.
๐ฎโโ๏ธ Job-related Announcements: Send global and internal announcements for specific jobs.
๐ค Player-specific Notifications: Send notifications to individual players.
๐ Automatic Announcements: Schedule automatic announcements at regular intervals.
๐ Discord Webhook Integration: Log announcements to Discord.
โฑ๏ธ Cooldown System: Prevent spam by setting cooldowns for different types of announcements.
โ๏ธ Framework Support: Compatible with ESX and QBCore.
๐จ Customizable Prefixes and Styles: Customize the appearance of announcements.
๐ TxAdmin Integration: Seamless integration with txAdmin features.
๐ Language Support
X_HUD_Announce supports multiple languages. You can change the current language in config.lua using the Config.Language variable:luaCopy
To add a new language, edit the shared/translation.lua file and extend the Translations.Languages and Translations.Messages sections.
๐ Integration with Other Scripts
X_HUD_Announce offers various exports and events that can be used by other scripts.
๐ฎ Server-side Exports
๐ฅ Server-side Events
๐ฑ Client-side Exports
๐ฒ Client-side Events
๐ Using Translations
You can use translation keys with an @ at the beginning:luaCopy
๐จ Notification Types
The following types can be used for notifications:
'info' (default, blue) ๐ฆ
'success' (green) ๐ข
'warning' (yellow) ๐จ
'error' (red) ๐ฅ
Job names (e.g., 'police', 'ambulance', 'mechanic') ๐ฎโโ๏ธ๐๐ง
TxAdmin types ('txadminannounce', 'txadminrestart', 'txadminwarning', 'txadmindm') ๐ข๐โ ๏ธ๐ฌ
๐ Parameters
message: The text to display (string)type: The type of notification (string, optional, default: 'info')duration: The duration in milliseconds (number, optional, default: from config)playerId: The server ID of the player (number)job: The job name (string)key: The translation key (string)language: The language (string, optional, default: from config)
โ๏ธ Configuration Guide
๐ Core Settings
๐ Language Configuration
๐ข Notification Configuration
๐ ๏ธ Framework Configuration
โฑ๏ธ Cooldown Configuration
๐ Automatic Announcement Configuration
๐ก๏ธ Admin Permissions Configuration
๐ฎโโ๏ธ Job Announcements Configuration
๐ Examples
๐ข Example 1: Sending an announcement to all players from a server script
๐ข Example 2: Sending a notification to a player with translation
๐ข Example 3: Sending an announcement to all police officers
๐ข Example 4: Triggering a client-side notification
๐ TxAdmin Integration
This resource provides seamless integration with txAdmin features:
๐ข Announcements
Automatically captures and formats txAdmin announcements from administrators using the txAdmin:events:announcement event. Displays these announcements to all players using your configured styling.
๐ Scheduled Restarts
Displays countdown notifications when a server restart is scheduled through txAdmin using the txAdmin:events:scheduledRestart event. The script automatically calculates the minutes remaining and formats a message according to your configuration.
โ ๏ธ Warnings
Shows warning notifications to players when they receive a warning from an administrator through the txAdmin:events:playerWarned event. Can be configured to also notify staff members.
๐ฌ Direct Messages
Displays direct messages sent from administrators to players through txAdmin using the txAdmin:events:playerDirectMessage event. Can be configured to also notify staff about sent messages.
๐ค Discord Logging
Configuration for logging various announcements to Discord:luaCopy
๐จ Customization
๐ Appearance Settings
๐ Animation Settings
๐ ๏ธ Troubleshooting
๐ Common Issues
"Drive-By Not Working":
Check
Config.BetterDriveBy = trueVerify seat permissions for the vehicle
Use
/carseatdebug command
Conflicts with Other Resources:
Disable sky-to-ground transitions if using multicharacter scripts
luaCopy
๐ฅ Download & Support
Tebex Store: Download Link
Discord Support: Join Discord
Last updated
