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:
parent
70a62d4b63
commit
b2ebe136c3
17 changed files with 175 additions and 41 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue