In the NotificationSystem class (in 3_Game\Client\Notifications\NotificationSystem.c), there are two static methods, SendNotificationToPlayerExtended and SendNotificationToPlayer whose descriptions claim they can be used to send notifications to all players, but their implementations do not actually support it.
/** \brief Send custom notification to player from server @param player the target player to send notification to - if null, will send to all players @param show_time amount of time this notification is displayed @param title_text the title text that is displayed in the notification @param detail_text additional text that can be added to the notification under the title - will not display additional text if not set @param icon the icon that is displayed in the notification - will use default icon if not set */ static void SendNotificationToPlayerExtended( Man player, float show_time, string title_text, string detail_text = "", string icon = "" ) { if( player ) { SendNotificationToPlayerIdentityExtended( player.GetIdentity(), show_time, title_text, detail_text, icon ); } }
/** \brief Send notification from default types to player from server @param player the target player to send notification to - if null, will send to all players @param type the type of notification to send - these can be viewed in /Scripts/Data/Notifications.json @param show_time amount of time this notification is displayed @param detail_text additional text that can be added to the notification under the title - will not display additional text if not set */ static void SendNotificationToPlayer( Man player, NotificationType type, float show_time, string detail_text = "" ) { if( player ) { SendNotificationToPlayerIdentity( player.GetIdentity(), type, show_time, detail_text ); } }
When null is passed as the player parameter to these methods, they do nothing.
The current work-around for sending notifications to all players is to use SendNotificationToPlayerIdentityExtended or SendNotificationToPlayerIdentity, instead.