mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-20 03:07:17 +00:00
1.6.9a
- Added `IsAdminSilent` to api - Fixed disabling noclip via admin menu - Fixed (?) hibernation problem - Added discord webhook fire when adding ban or mute for offline player - Updated css and mysqlconnector
This commit is contained in:
@@ -96,7 +96,7 @@ public partial class CS2_SimpleAdmin
|
||||
GravityPlayers.Remove(player);
|
||||
|
||||
if (player.UserId.HasValue)
|
||||
PlayersInfo.Remove(player.UserId.Value);
|
||||
PlayersInfo.TryRemove(player.UserId.Value, out _);
|
||||
|
||||
var authorizedSteamId = player.AuthorizedSteamID;
|
||||
if (authorizedSteamId == null || !PermissionManager.AdminCache.TryGetValue(authorizedSteamId,
|
||||
@@ -132,7 +132,7 @@ public partial class CS2_SimpleAdmin
|
||||
public HookResult OnRoundStart(EventRoundStart @event, GameEventInfo info)
|
||||
{
|
||||
#if DEBUG
|
||||
Logger.LogCritical("[OnRoundEnd]");
|
||||
Logger.LogCritical("[OnRoundStart]");
|
||||
#endif
|
||||
|
||||
GodPlayers.Clear();
|
||||
@@ -209,7 +209,9 @@ public partial class CS2_SimpleAdmin
|
||||
if (target == null || !target.IsValid || target.Connected != PlayerConnectedState.PlayerConnected)
|
||||
return HookResult.Continue;
|
||||
|
||||
return !AdminManager.CanPlayerTarget(player, target) ? HookResult.Stop : HookResult.Continue;
|
||||
Logger.LogInformation($"{player.PlayerName} {AdminManager.GetPlayerImmunity(player).ToString()} probuje wywalic {target.PlayerName} {AdminManager.GetPlayerImmunity(target).ToString()}");
|
||||
|
||||
return !player.CanTarget(target) ? HookResult.Stop : HookResult.Continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,12 +368,15 @@ public partial class CS2_SimpleAdmin
|
||||
{
|
||||
var player = @event.Userid;
|
||||
|
||||
if (player?.UserId == null || player.IsBot || player.Connected != PlayerConnectedState.PlayerConnected)
|
||||
if (player?.UserId == null || !player.IsValid || player.IsHLTV || player.Connected != PlayerConnectedState.PlayerConnected)
|
||||
return HookResult.Continue;
|
||||
|
||||
SpeedPlayers.Remove(player.Slot);
|
||||
GravityPlayers.Remove(player);
|
||||
|
||||
if (!PlayersInfo.ContainsKey(player.UserId.Value))
|
||||
return HookResult.Continue;
|
||||
|
||||
PlayersInfo[player.UserId.Value].DiePosition = new DiePosition(
|
||||
new Vector(
|
||||
player.PlayerPawn.Value?.AbsOrigin?.X ?? 0,
|
||||
|
||||
Reference in New Issue
Block a user