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