From 01ceb104c551a9c172446f96e7f563c6fd3eb5d6 Mon Sep 17 00:00:00 2001 From: Dawid Bepierszcz <41084667+daffyyyy@users.noreply.github.com> Date: Sat, 10 Feb 2024 15:31:09 +0100 Subject: [PATCH] Update Events.cs --- Events.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Events.cs b/Events.cs index 2978697..defe150 100644 --- a/Events.cs +++ b/Events.cs @@ -334,15 +334,18 @@ public partial class CS2_SimpleAdmin }); }, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE); - ConVar? botQuota = ConVar.Find("bot_quota"); - if (botQuota != null && botQuota.GetPrimitiveValue() > 0) + AddTimer(2.0f, () => { - Logger.LogInformation("Due to bugs with bots (game bug), consider disabling bots by setting `bot_quota 0` in the gamemode config if your server crashes after a map change."); - Logger.LogWarning("Due to bugs with bots (game bug), consider disabling bots by setting `bot_quota 0` in the gamemode config if your server crashes after a map change."); - Logger.LogCritical("Due to bugs with bots (game bug), consider disabling bots by setting `bot_quota 0` in the gamemode config if your server crashes after a map change."); - } + ConVar? botQuota = ConVar.Find("bot_quota"); + if (botQuota != null && botQuota.GetPrimitiveValue() > 0) + { + Logger.LogInformation("Due to bugs with bots (game bug), consider disabling bots by setting `bot_quota 0` in the gamemode config if your server crashes after a map change."); + Logger.LogWarning("Due to bugs with bots (game bug), consider disabling bots by setting `bot_quota 0` in the gamemode config if your server crashes after a map change."); + Logger.LogCritical("Due to bugs with bots (game bug), consider disabling bots by setting `bot_quota 0` in the gamemode config if your server crashes after a map change."); + } + }); } [GameEventHandler]