changed timer frequency and clean up

This commit is contained in:
Oldcustard 2023-03-06 23:16:29 +11:00
parent 53c2970234
commit df14ed2165

View File

@ -51,7 +51,7 @@ public void OnMapStart()
* @note Precache your models, sounds, etc. here! * @note Precache your models, sounds, etc. here!
* Not in OnConfigsExecuted! Doing so leads to issues. * Not in OnConfigsExecuted! Doing so leads to issues.
*/ */
g_reminder_timer = CreateTimer(15.0, PostReminder, 0, TIMER_REPEAT); g_reminder_timer = CreateTimer(30.0, PostReminder, 0, TIMER_REPEAT);
char config_name[64]; char config_name[64];
LoadConfig(config_name, sizeof(config_name)); LoadConfig(config_name, sizeof(config_name));
@ -98,10 +98,12 @@ Action BlockStart(Event event, const char[] name, bool dontBroadcast)
if (g_bConfigLoaded) if (g_bConfigLoaded)
{ {
KillTimer(g_reminder_timer); KillTimer(g_reminder_timer);
PrintToServer("[AUTOCONFIG] Match started, going silent.");
return Plugin_Continue; return Plugin_Continue;
} }
ServerCommand("mp_tournament_restart"); ServerCommand("mp_tournament_restart");
CPrintToChatAll("{yellow}Bad rollout! {default}(Did you forget to exec?)"); CPrintToChatAll("{yellow}Bad rollout! {default}(Did you forget to exec?)");
PrintToServer("[AUTOCONFIG] Match start blocked due to no config");
return Plugin_Handled; return Plugin_Handled;
} }