Skip to content

Commit

Permalink
Update Events.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
daffyyyy committed Feb 10, 2024
1 parent e401fe7 commit 01ceb10
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,18 @@ await connection.ExecuteAsync(
});
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);

ConVar? botQuota = ConVar.Find("bot_quota");

if (botQuota != null && botQuota.GetPrimitiveValue<int>() > 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<int>() > 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]
Expand Down

0 comments on commit 01ceb10

Please sign in to comment.