diff --git a/EXILED/Exiled.API/Features/Map.cs b/EXILED/Exiled.API/Features/Map.cs index 4a953744f2..e3c3f05c1c 100644 --- a/EXILED/Exiled.API/Features/Map.cs +++ b/EXILED/Exiled.API/Features/Map.cs @@ -133,6 +133,17 @@ public static void Broadcast(ushort duration, string message, global::Broadcast. Server.Broadcast.RpcAddElement(message, duration, type); } + /// + /// Broadcasts delegate invocation result to all players. + /// + /// The duration in seconds. + /// The delegate whose invocation result will be the message. + public static void Broadcast(ushort duration, Func func) + { + foreach (Player player in Player.List) + player.Broadcast(duration, func.Invoke(player)); + } + /// /// Shows a hint to all players. ///