diff --git a/Server/Commands/Faction.cs b/Server/Commands/Faction.cs index aacce988..f1b84674 100644 --- a/Server/Commands/Faction.cs +++ b/Server/Commands/Faction.cs @@ -183,5 +183,21 @@ namespace reallife_gamemode.Server.Commands } } + [Command("lc", "~m~Benutzung: ~s~/lc [Nachricht]", GreedyArg = true)] + public void CmdFactionLc(Client player, string message) + { + if (player.GetUser()?.FactionId == null || player.GetUser().FactionLeader == false) + { + ChatService.NotAuthorized(player); + return; + } + + string broadcastMsg = "~y~[" + player.GetUser().GetFaction().Name + "] " + player.Name + ": " + message; + + NAPI.Pools.GetAllPlayers().ForEach(p => + { + if (p.GetUser()?.FactionLeader ?? false) p.SendChatMessage(broadcastMsg); + }); + } } }