Team chat for all
This commit is contained in:
parent
6f3f9cf554
commit
9d245f0557
1 changed files with 9 additions and 1 deletions
10
CS2-Tags.cs
10
CS2-Tags.cs
|
|
@ -211,7 +211,15 @@ public class CS2_Tags : BasePlugin
|
|||
}
|
||||
}
|
||||
|
||||
return HookResult.Continue;
|
||||
for (int i = 1; i <= Server.MaxPlayers; i++)
|
||||
{
|
||||
CCSPlayerController? p = Utilities.GetPlayerFromIndex(i);
|
||||
if (p == null || !p.IsValid || p.IsBot || p.TeamNum != player.TeamNum) continue;
|
||||
|
||||
p.PrintToChat(ReplaceTags($" {TeamName(player.TeamNum)} {ChatColors.Default}{player.PlayerName}: {info.GetArg(1)}"));
|
||||
}
|
||||
|
||||
return HookResult.Handled;
|
||||
}
|
||||
|
||||
private string TeamName(int teamNum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue