mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-09-27 20:17:04 +02:00
Probably fix for auto ungag?
This commit is contained in:
parent
22bb7ebac0
commit
719caeafef
1 changed files with 19 additions and 3 deletions
|
|
@ -306,8 +306,16 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
|
||||||
if (TagsDetected)
|
if (TagsDetected)
|
||||||
NativeAPI.IssueServerCommand($"css_tag_unmute {player.Index}");
|
NativeAPI.IssueServerCommand($"css_tag_unmute {player.Index}");
|
||||||
|
|
||||||
MuteManager _muteManager = new(dbConnectionString);
|
if (gaggedPlayers.Contains((int)player.Index))
|
||||||
_ = _muteManager.UnmutePlayer(player.AuthorizedSteamID.SteamId64.ToString(), 0);
|
{
|
||||||
|
if (gaggedPlayers.TryTake(out int removedItem) && removedItem != (int)player.Index)
|
||||||
|
{
|
||||||
|
gaggedPlayers.Add(removedItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MuteManager _muteManager = new(dbConnectionString);
|
||||||
|
//_ = _muteManager.UnmutePlayer(player.AuthorizedSteamID.SteamId64.ToString(), 0);
|
||||||
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -401,7 +409,15 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
|
||||||
if (TagsDetected)
|
if (TagsDetected)
|
||||||
NativeAPI.IssueServerCommand($"css_tag_unmute {player.Index.ToString()}");
|
NativeAPI.IssueServerCommand($"css_tag_unmute {player.Index.ToString()}");
|
||||||
|
|
||||||
_ = _muteManager.UnmutePlayer(player.AuthorizedSteamID.SteamId64.ToString(), 0);
|
if (gaggedPlayers.Contains((int)player.Index))
|
||||||
|
{
|
||||||
|
if (gaggedPlayers.TryTake(out int removedItem) && removedItem != (int)player.Index)
|
||||||
|
{
|
||||||
|
gaggedPlayers.Add(removedItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//_ = _muteManager.UnmutePlayer(player.AuthorizedSteamID.SteamId64.ToString(), 0);
|
||||||
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue