Add gang chat /ga
This commit is contained in:
@@ -39,6 +39,28 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
ChatService.BroadcastFaction(broadcastMessage, f);
|
ChatService.BroadcastFaction(broadcastMessage, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Command("ga", "~m~Benutzung: ~s~/ga [Nachricht]", GreedyArg = true)]
|
||||||
|
public void CmdFactionGA(Player player, string message)
|
||||||
|
{
|
||||||
|
Faction f = player.GetUser()?.Faction;
|
||||||
|
if (f == null || f.StateOwned)
|
||||||
|
{
|
||||||
|
ChatService.NotAuthorized(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (player.GetUser().Faction.Name == "Ballas" || player.GetUser().Faction.Name == "Grove")
|
||||||
|
{
|
||||||
|
message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", "");
|
||||||
|
|
||||||
|
string broadcastMessage = "!{FF0000}** " + player.GetUser().GetFactionRank().RankName + " " + player.Name + ": " + message + " )) **";
|
||||||
|
ChatService.BroadcastFaction(broadcastMessage, f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Command("r", "~m~Benutzung: ~s~/r [Nachricht]", GreedyArg = true)]
|
[Command("r", "~m~Benutzung: ~s~/r [Nachricht]", GreedyArg = true)]
|
||||||
public void CmdFactionR(Player player, string message)
|
public void CmdFactionR(Player player, string message)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user