Page cover

๐Ÿ’พ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 = true

    • Verify seat permissions for the vehicle

    • Use /carseat debug command

  • Conflicts with Other Resources:

    • Disable sky-to-ground transitions if using multicharacter scripts

    • luaCopy


๐Ÿ“ฅ Download & Support

Last updated