Added adminchat on say_team @
This commit is contained in:
parent
098c158c9f
commit
c98c682dbe
1 changed files with 9 additions and 1 deletions
10
CS2-Tags.cs
10
CS2-Tags.cs
|
|
@ -213,7 +213,6 @@ public class CS2_Tags : BasePlugin
|
|||
return HookResult.Continue;
|
||||
}
|
||||
|
||||
|
||||
private HookResult OnPlayerChat(CCSPlayerController? player, CommandInfo info)
|
||||
{
|
||||
if (player == null || !player.IsValid || info.GetArg(1).Length == 0) return HookResult.Continue;
|
||||
|
|
@ -303,6 +302,15 @@ public class CS2_Tags : BasePlugin
|
|||
|
||||
if (GaggedIds.Contains((int)player.Index)) return HookResult.Handled;
|
||||
|
||||
if (info.GetArg(1).StartsWith("@") && AdminManager.PlayerHasPermissions(player, "@css/chat"))
|
||||
{
|
||||
foreach (var p in Utilities.GetPlayers().Where(p => p.IsValid && !p.IsBot && !p.IsHLTV && AdminManager.PlayerHasPermissions(p, "@css/chat")))
|
||||
{
|
||||
p.PrintToChat($" {ChatColors.Lime}(ADMIN) {ChatColors.Default}{player.PlayerName}: {info.GetArg(1)}");
|
||||
}
|
||||
return HookResult.Continue;
|
||||
}
|
||||
|
||||
if (info.GetArg(1).StartsWith("!") || info.GetArg(1).StartsWith("@") || info.GetArg(1).StartsWith("/") || info.GetArg(1).StartsWith(".") || info.GetArg(1) == "rtv") return HookResult.Continue;
|
||||
|
||||
if (JsonTags != null && JsonTags.TryGetValue("tags", out var tags) && tags is JObject tagsObject)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue