forked from UNLOZE/sm-plugins
clean up and rename
This commit is contained in:
@@ -33,7 +33,7 @@ int g_iMaxPopulation;
|
||||
float g_fKnockbackPopulationBoost;
|
||||
float g_fNapalmPopulationReduction;
|
||||
|
||||
int g_iAntiNoob;
|
||||
bool g_bAntiNoob;
|
||||
char g_cAntiNoobHelp[64];
|
||||
char g_cAntiNoobPopulation[32];
|
||||
|
||||
@@ -52,7 +52,7 @@ public void OnPluginStart()
|
||||
|
||||
ConVar cvar;
|
||||
HookConVarChange((cvar = CreateConVar("sm_an_help", "1", "1 = AntiNoob performs help, 0 = AntiNoob is disabled", FCVAR_NONE, true, 0.0, true, 1.0)), g_cvAntiNoob);
|
||||
g_iAntiNoob = cvar.IntValue;
|
||||
g_bAntiNoob = cvar.BoolValue;
|
||||
HookConVarChange((cvar = CreateConVar("sm_an_maxplayers", "40", "max active players until the kb should be increased")), g_cvMaxPopulation);
|
||||
g_iMaxPopulation = cvar.IntValue;
|
||||
HookConVarChange((cvar = CreateConVar("sm_an_kb_population", "5.0", "knockback boost during low population in procent (stacks with the helps)")), g_cvKnockbackPopulationBoost);
|
||||
@@ -95,7 +95,7 @@ public void OnPluginStart()
|
||||
|
||||
public void g_cvAntiNoob(ConVar convar, const char[] oldValue, const char[] newValue)
|
||||
{
|
||||
g_iAntiNoob = convar.IntValue;
|
||||
g_bAntiNoob = convar.BoolValue;
|
||||
}
|
||||
|
||||
public void g_cvMaxPopulation(ConVar convar, const char[] oldValue, const char[] newValue)
|
||||
@@ -218,7 +218,7 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||
}
|
||||
}
|
||||
|
||||
if(g_iAntiNoob == 0)
|
||||
if(!g_bAntiNoob)
|
||||
{
|
||||
g_cAntiNoobHelp = "{cyan}[AntiNoob]{white} Currently disabled";
|
||||
g_cAntiNoobPopulation = "{white}.";
|
||||
@@ -315,7 +315,7 @@ public void PerformLowHelp()
|
||||
|
||||
public void PerformReset()
|
||||
{
|
||||
if(g_bLowPopulation && g_iAntiNoob != 0)
|
||||
if(g_bLowPopulation && g_bAntiNoob)
|
||||
{
|
||||
ServerCommand("zr_class_set_multiplier zombies knockback %f", 1.0 + g_fKnockbackPopulationBoost);
|
||||
ServerCommand("zr_napalm_time_scale %f", 50.0 - g_fNapalmPopulationReduction);
|
||||
|
||||
Reference in New Issue
Block a user