Respecting immunity and css_team command

This commit is contained in:
daffyyyy
2023-12-06 01:55:30 +01:00
parent dcc85b21c3
commit fdbf1b1a5c
5 changed files with 148 additions and 33 deletions

View File

@@ -35,7 +35,10 @@ namespace CS2_SimpleAdmin
CCSPlayerController? player = Utilities.GetPlayerFromIndex(playerIndex);
if (player == null || !player.IsValid || player.AuthorizedSteamID == null)
if (player == null || !player.IsValid || player.IsBot || player.IsHLTV)
return;
if (player.AuthorizedSteamID == null)
{
AddTimer(3.0f, () =>
{
@@ -60,7 +63,7 @@ namespace CS2_SimpleAdmin
bool isBanned = await _banManager.IsPlayerBanned(playerInfo);
MuteManager _muteManager = new(dbConnectionString);
List<dynamic> activeMutes = await _muteManager.IsPlayerMuted(playerInfo.SteamId);
List<dynamic> activeMutes = await _muteManager.IsPlayerMuted(playerInfo.SteamId!);
Server.NextFrame(() =>
{