This commit is contained in:
daffyyyy
2023-12-04 00:43:47 +01:00
parent bd0f21b2ad
commit 9c293e6201
2 changed files with 22 additions and 6 deletions

View File

@@ -58,7 +58,12 @@ namespace CS2_SimpleAdmin
if (player == null || !player.IsValid || player.IsBot || player.IsHLTV) return;
if (gaggedPlayers.Contains((int)player.Index))
gaggedPlayers.Remove((int)player.Index);
{
if (gaggedPlayers.TryTake(out int removedItem) && removedItem != (int)player.Index)
{
gaggedPlayers.Add(removedItem);
}
}
if (TagsDetected)
NativeAPI.IssueServerCommand($"css_tag_unmute {player!.Index.ToString()}");