final updates (i hope)
This commit is contained in:
parent
aabe297d25
commit
53c2970234
@ -6,7 +6,7 @@
|
||||
#pragma semicolon 1
|
||||
#pragma newdecls required
|
||||
|
||||
#define PLUGIN_VERSION "0.1"
|
||||
#define PLUGIN_VERSION "1.0"
|
||||
|
||||
ConVar g_cvarConfigName;
|
||||
bool g_bConfigLoaded = false;
|
||||
@ -58,23 +58,23 @@ public void OnMapStart()
|
||||
|
||||
if (StrEqual(config_name, "variable"))
|
||||
{
|
||||
g_bConfigLoaded = false;
|
||||
PrintToServer("[AUTOCONFIG] Config Loaded FALSE");
|
||||
PrintToServer("[AUTOCONFIG] Blocking Match Start");
|
||||
g_bConfigLoaded = false;
|
||||
PrintToServer("[AUTOCONFIG] Config Loaded FALSE");
|
||||
PrintToServer("[AUTOCONFIG] Blocking Match Start");
|
||||
}
|
||||
else
|
||||
{
|
||||
ServerCommand("exec %s", config_name);
|
||||
ServerCommand("exec %s", config_name);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnMapEnd()
|
||||
{
|
||||
KillTimer(g_reminder_timer);
|
||||
g_bConfigLoaded = false;
|
||||
g_cvarConfigName.SetString("NULL");
|
||||
PrintToServer("[AUTOCONFIG] Config Loaded FALSE");
|
||||
PrintToServer("[AUTOCONFIG] Blocking Match Start");
|
||||
KillTimer(g_reminder_timer);
|
||||
g_bConfigLoaded = false;
|
||||
g_cvarConfigName.SetString("NULL");
|
||||
PrintToServer("[AUTOCONFIG] Config Loaded FALSE");
|
||||
PrintToServer("[AUTOCONFIG] Blocking Match Start");
|
||||
}
|
||||
|
||||
Action PostReminder(Handle timer, any data)
|
||||
@ -83,8 +83,8 @@ Action PostReminder(Handle timer, any data)
|
||||
{
|
||||
char config_name[64];
|
||||
g_cvarConfigName.GetString(config_name, sizeof(config_name));
|
||||
CPrintToChatAll("{green}Config loaded: %s", config_name);
|
||||
return Plugin_Handled;
|
||||
CPrintToChatAll("{green}Config loaded: %s", config_name);
|
||||
return Plugin_Handled;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -97,7 +97,8 @@ Action BlockStart(Event event, const char[] name, bool dontBroadcast)
|
||||
{
|
||||
if (g_bConfigLoaded)
|
||||
{
|
||||
return Plugin_Continue;
|
||||
KillTimer(g_reminder_timer);
|
||||
return Plugin_Continue;
|
||||
}
|
||||
ServerCommand("mp_tournament_restart");
|
||||
CPrintToChatAll("{yellow}Bad rollout! {default}(Did you forget to exec?)");
|
||||
@ -163,11 +164,11 @@ bool LoadConfig(char[] config_name, int maxlength)
|
||||
}
|
||||
|
||||
void ConfigNameChangeCallback(ConVar convar, const char[] oldValue, const char[] newValue)
|
||||
{
|
||||
if (!StrEqual(newValue, "NULL"))
|
||||
{
|
||||
g_bConfigLoaded = true;
|
||||
PrintToServer("[AUTOCONFIG] Config Loaded TRUE");
|
||||
PrintToServer("[AUTOCONFIG] Unblocking Match Start");
|
||||
}
|
||||
{
|
||||
if (!StrEqual(newValue, "NULL"))
|
||||
{
|
||||
g_bConfigLoaded = true;
|
||||
PrintToServer("[AUTOCONFIG] Config Loaded TRUE");
|
||||
PrintToServer("[AUTOCONFIG] Unblocking Match Start");
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user