- Fixed crash when using command on invalid player
- Using banid command to reduce number of queries to database (only if unlock commands enabled in css config)
- Minor changes
This commit is contained in:
Dawid Bepierszcz
2024-06-23 12:59:14 +02:00
parent 8e4724fb3e
commit cdd771511b
10 changed files with 109 additions and 92 deletions

View File

@@ -69,7 +69,7 @@ namespace CS2_SimpleAdmin
var targets = GetTarget(command);
if (targets == null) return;
var playersToTarget = targets.Players.Where(player => player.IsValid && player.SteamID.ToString().Length == 17 && !player.IsHLTV).ToList();
var playersToTarget = targets.Players.Where(player => player is { IsValid: true, IsHLTV: false }).ToList();
//Helper.LogCommand(caller, command);