From f64ec60629b271c03b95c1d0c8ad84d5981cd700 Mon Sep 17 00:00:00 2001 From: daffyyyy Date: Mon, 20 Nov 2023 23:02:06 +0100 Subject: [PATCH] Temp fix for commands and rtv without ! --- CS2-Tags.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CS2-Tags.cs b/CS2-Tags.cs index 67291e1..3ce2253 100644 --- a/CS2-Tags.cs +++ b/CS2-Tags.cs @@ -101,6 +101,8 @@ public class CS2_Tags : BasePlugin if (player == null || !player.IsValid) return HookResult.Continue; string steamid = new SteamID(player.SteamID).SteamId64.ToString(); + if (info.GetArg(1) == "rtv") return HookResult.Continue; + if (JsonTags != null && JsonTags.TryGetValue("tags", out var tags) && tags is JObject tagsObject) { if (tagsObject.TryGetValue(steamid, out var playerTag) && playerTag is JObject) @@ -111,7 +113,7 @@ public class CS2_Tags : BasePlugin Server.PrintToChatAll(ReplaceTags($" {prefix}{nickColor}{player.PlayerName}{ChatColors.Default}: {messageColor}{info.GetArg(1)}")); - if (info.GetArg(1).StartsWith("!")) + if (info.GetArg(1).StartsWith("!") || info.GetArg(1).StartsWith("/")) { CBasePlayerPawn pawn = new CBasePlayerPawn(NativeAPI.GetEntityFromIndex((int)player.EntityIndex!.Value.Value)); var playerIndex = (int)pawn.Controller.Value.EntityIndex!.Value.Value; @@ -139,7 +141,7 @@ public class CS2_Tags : BasePlugin Server.PrintToChatAll(ReplaceTags($" {prefix}{nickColor}{player.PlayerName}{ChatColors.Default}: {messageColor}{info.GetArg(1)}")); - if (info.GetArg(1).StartsWith("!")) + if (info.GetArg(1).StartsWith("!") || info.GetArg(1).StartsWith("/")) { CBasePlayerPawn pawn = new CBasePlayerPawn(NativeAPI.GetEntityFromIndex((int)player.EntityIndex!.Value.Value)); var playerIndex = (int)pawn.Controller.Value.EntityIndex!.Value.Value;