Added /lc (Leader Chat)
This commit is contained in:
@@ -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);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user