Introduce OuterCol() function to dynamically set the outer border color based on the announcement_theme configuration. The border will be white when theme is set to "white", otherwise it defaults to the accent color. This allows for better visual customization of the admin menu appearance.
Add documentation explaining the optional 'target' parameter that allows restricting announcements to specific usergroups like 'vip', with all users receiving the announcement by default if not specified.
Add 'target' field to all announcement presets to specify which users receive the announcement. The target can be 'all' for everyone or a specific usergroup like 'vip' or 'admin'.
This allows announcements to be selectively sent to different user groups.
Add support for targeting announcements to specific usergroups or individual players.
- Add 'target' field to store a usergroup to filter recipients
- Implement recipient filtering logic that prioritizes explicit player lists over usergroup lists over preset target
- Update net.Broadcast() to net.Send() when specific recipients are selected
- Parse scope parameter from client to determine targeting type (all/group/players)
- Return early if no valid recipients are found after filtering
Add a new dropdown menu for selecting announcement recipients with three options:
- "Tout le monde" (Everyone): broadcasts to all players
- "Groupe" (Group): allows selecting specific user groups
- "Joueurs" (Players): allows selecting individual players
Implement an animated scrollable list panel that displays checkboxes for group or player selection based on the chosen scope. The panel height animates smoothly between collapsed and expanded states.
Extract the frequently used outline color (255, 255, 255, 60) into a COL_LINE constant. Add a DrawArrow helper function to render dropdown indicators. Update the send button validation logic to ensure at least one recipient is selected before sending.
The panel remains open after sending so the admin can keep their text and reuse it if needed.
Register BladW announcement privilege with supported admin mods (SAM, ULX/ULib, FAdmin) and provide function to check player access rights. Supports multiple admin systems with fallback to base admin status.
- Add BladW.Announcement.HasAccess() permission check to menu commands and net receive
- Implement announcement queueing: prevent stacking announcements while one is already displaying
- Track active announcement duration with activeUntil timer
- Add feedback to admin: send result status and remaining queue time after broadcast attempt
- Improve chat command handling: hide command from chat for all users, only open menu if authorized
- Refactor configuration and duration retrieval for clarity
Implement bidirectional communication for announcement submissions:
- Display server feedback messages (e.g., announcement already in progress) in the admin menu
- Keep the menu open after sending to allow users to retry if submission fails
- Add net.Receive handler to process server responses
- Show countdown timer when announcement is already in progress
- Close menu only on successful publication, not on rejection
This improves UX by giving admins visibility into why their submission failed and allowing them to correct and resubmit without losing their input.
Create a new schedule configuration file that allows defining automated announcements with flexible scheduling options.
Supports two scheduling methods:
- Interval-based: every X seconds/minutes/hours/days
- Cron-based: standard 5-field cron syntax for precise scheduling
Announcements can use presets (discord, restart, event) or custom title/text combinations.
Includes comprehensive documentation and commented examples.
Add a new sh_presets.lua file containing reusable announcement presets including restart, shutdown, maintenance, event, and discord announcements. Each preset defines title, text, style, and duration properties that can be used by the menu and scheduler.
Implement a scheduler system for BladW announcements that supports both:
- Interval-based scheduling (e.g., "30m", "90s", "2h", "1d")
- Cron-based scheduling with standard 5-field format (minute hour day month weekday)
The scheduler parses configuration from BladW.Announcement.Schedules and manages timers automatically, cleaning up old timers on reload. Cron expressions are validated and compiled into matcher functions for efficient execution checking every 20 seconds.
Add network string registration for the announcement module:
- bladWOpenAnnouncementMenu: opens announcement menu on client
- bladWSendAnnouncement: receives announcement from admin
- bladWShowAnnouncement: broadcasts announcement to all players
Implement server-side announcement system with the following features:
- LimitChars() utility function to safely truncate strings with UTF-8 support
- bladw_amenu concommand to open announcement menu for players
- /bannonce and !bannonce chat commands as aliases for the menu
- Resolve() function to merge announcement presets with custom entries
- Broadcast() function to send announcements to all clients with proper length limits
- Net message receiver for admin announcement submissions
- Resource file declaration for sound asset download
Implement a responsive announcement display system with support for multiple styles (loader with progress bar and border timer). Features include:
- Dynamic font scaling based on screen resolution
- Smooth intro/outro animations with easing
- Text wrapping for multi-line messages
- Customizable styling and duration
- Border timer visualization for remaining time
- Network message handling for server-sent announcements
Implement net.Receive handler to open the announcement admin menu when triggered by the server. This allows server-side code to remotely open the admin menu on client instances.
Implement a custom GUI menu for administrators to send announcements with the following features:
- Support for announcement presets that auto-fill title and message fields
- Real-time character count validation with visual feedback
- Warning indicator when message exceeds max length limit
- Custom styled text input fields with placeholder text
- Rounded corners and custom color scheme matching announcement styling
- Close button and ESC key handling
- Network message handling to send announcements to server