- Changed PawnIsAlive to LifeState
- Changed AdminCache - now it only removes flags added in the database - not all assigned to player
- Added config variable `IgnoredIps` to ignore ip check on connect, useful when proxying
This commit is contained in:
Dawid Bepierszcz 2025-03-25 11:39:00 +01:00
parent 888d6b0152
commit b6c876d709
13 changed files with 134 additions and 70 deletions

View file

@ -366,10 +366,10 @@ public partial class CS2_SimpleAdmin
: (_localizer?["sa_console"] ?? "Console");
// Freeze player pawn if alive
if (player.PawnIsAlive)
if (player.PlayerPawn?.Value?.LifeState == (int)LifeState_t.LIFE_ALIVE)
{
player.Pawn.Value?.Freeze();
AddTimer(5.0f, () => player.Pawn.Value?.Unfreeze(), CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
player.PlayerPawn?.Value?.Freeze();
AddTimer(5.0f, () => player.PlayerPawn?.Value?.Unfreeze(), CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
}
// Get player and admin information