moving cvars over to the mapchooser_extended.cfg so people can see the values at https://unloze.com/mapchooser_css_ze/mapchooser_extended.cfg
This commit is contained in:
parent
7e473490d1
commit
c267fb1457
@ -492,8 +492,17 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
|
||||
return APLRes_Success;
|
||||
}
|
||||
|
||||
public Action GetInternalGetCvars(Handle timer)
|
||||
{
|
||||
InternalGetCvars(); //reading some cvars from the mapchooser_extended.cfg instead of server.cfg so people can view the values on
|
||||
// https://unloze.com/mapchooser_css_ze/mapchooser_extended.cfg
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
public void OnMapStart()
|
||||
{
|
||||
CreateTimer(1.0, GetInternalGetCvars);
|
||||
|
||||
int total_time = (GetConVarInt(g_Cvar_VoteDuration) * 2) + GetConVarInt(g_Cvar_RunOffWarningTime) + 10;
|
||||
ServerCommand("sm_cvar mp_chattime %i", total_time); //prevents map switching supposedly.
|
||||
g_DidRoundTerminate = false;
|
||||
@ -3119,6 +3128,23 @@ stock int InternalGetMapGroups(const char[] map, int[] groups, int size)
|
||||
return found;
|
||||
}
|
||||
|
||||
stock void InternalGetCvars()
|
||||
{
|
||||
if (g_Config && g_Config.JumpToKey("_cvars"))
|
||||
{
|
||||
g_Config.GotoFirstSubKey(false);
|
||||
char cvar_name[256];
|
||||
char cvar_value[256];
|
||||
do
|
||||
{
|
||||
g_Config.GetSectionName(cvar_name, sizeof(cvar_name));
|
||||
g_Config.GetString(NULL_STRING, cvar_value, sizeof(cvar_value));
|
||||
ServerCommand("sm_cvar %s %s", cvar_name, cvar_value);
|
||||
} while (g_Config.GotoNextKey(false));
|
||||
g_Config.Rewind();
|
||||
}
|
||||
}
|
||||
|
||||
stock int InternalGetGroupMax(int group)
|
||||
{
|
||||
char groupstr[8];
|
||||
|
Loading…
Reference in New Issue
Block a user