PushNades: add config

This commit is contained in:
BotoX 2018-08-09 19:44:44 +02:00
parent eefb23882b
commit 40033e9dab

View File

@ -27,14 +27,12 @@ public void OnPluginStart()
g_hCVar_PushScale = CreateConVar("sm_hegrenade_push_scale", "0", "Make the push scale with the distance to the explosion", 0, true, 0.0, true, 1.0);
g_hCVar_PushRange = CreateConVar("sm_hegrenade_push_range", "500", "Range arround Explosion in which Zombies are affected by the push.");
g_hCVar_PushStrength = CreateConVar("sm_hegrenade_push_strength", "2500", "How strong the HE-Grenade pushes back");
AutoExecConfig(true, "plugin.PushNades");
HookEvent("hegrenade_detonate", OnHEDetonate);
}
public void OnMapStart()
{
}
public Action OnHEDetonate(Event hEvent, const char[] sEvent, bool bDontBroadcast)
{
if (!GetConVarBool(g_hCVar_PushNadesEnabled))
@ -109,4 +107,4 @@ bool IsValidClient(int client, bool nobots = true)
return false;
}
return IsClientInGame(client);
}
}