Added translation

- Minor changes
- Version bump
- Added translation
This commit is contained in:
Dawid Bepierszcz
2024-04-02 19:42:16 +02:00
parent 052cea5ce3
commit 89d27e1bd3
21 changed files with 392 additions and 208 deletions

View File

@@ -87,7 +87,6 @@ public partial class CS2_SimpleAdmin
}
}
[GameEventHandler]
public HookResult OnPlayerFullConnect(EventPlayerConnectFull @event, GameEventInfo info)
{
@@ -226,10 +225,13 @@ public partial class CS2_SimpleAdmin
public HookResult OnCommandSay(CCSPlayerController? player, CommandInfo info)
{
if (player is null || !player.IsValid || player.IsBot || player.IsHLTV || info.GetArg(1).Length == 0 || info.GetArg(1).StartsWith("/")
if (player is null || !player.IsValid || player.IsBot || player.IsHLTV || info.GetArg(1).StartsWith("/")
|| info.GetArg(1).StartsWith("!") && info.GetArg(1).Length >= 12)
return HookResult.Continue;
if (info.GetArg(1).Length == 0)
return HookResult.Handled;
PlayerPenaltyManager playerPenaltyManager = new PlayerPenaltyManager();
if (playerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Gag) || playerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Silence))
@@ -240,10 +242,13 @@ public partial class CS2_SimpleAdmin
public HookResult OnCommandTeamSay(CCSPlayerController? player, CommandInfo info)
{
if (player is null || !player.IsValid || player.IsBot || player.IsHLTV || info.GetArg(1).Length == 0 || info.GetArg(1).StartsWith("/")
if (player is null || !player.IsValid || player.IsBot || player.IsHLTV || info.GetArg(1).StartsWith("/")
|| info.GetArg(1).StartsWith("!") && info.GetArg(1).Length >= 12)
return HookResult.Continue;
if (info.GetArg(1).Length == 0)
return HookResult.Handled;
PlayerPenaltyManager playerPenaltyManager = new PlayerPenaltyManager();
if (playerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Gag) || playerPenaltyManager.IsPenalized(player.Slot, PenaltyType.Silence))
@@ -297,7 +302,6 @@ public partial class CS2_SimpleAdmin
AddTimer(61.0f, () =>
{
#if DEBUG
Logger.LogCritical("[OnMapStart] Expired check");
#endif
@@ -407,7 +411,6 @@ public partial class CS2_SimpleAdmin
await _adminManager.GiveAllFlags();
});
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
AddTimer(3.0f, () =>