From 353ba1c0c25b60b8d3c554984e174b56ddf67441 Mon Sep 17 00:00:00 2001 From: Dogan Date: Sun, 13 Oct 2019 20:57:17 +0200 Subject: [PATCH] KnifeRevert: more oops --- KnifeRevert/scripting/KnifeRevert.sp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/KnifeRevert/scripting/KnifeRevert.sp b/KnifeRevert/scripting/KnifeRevert.sp index 9b2dabc6..9bd82e92 100644 --- a/KnifeRevert/scripting/KnifeRevert.sp +++ b/KnifeRevert/scripting/KnifeRevert.sp @@ -5,7 +5,7 @@ #include #include -bool g_bZAbuse; +bool g_bKnifeRevert; bool g_bSlayKnifer; float g_fMaxDistance; float g_fMaxTime; @@ -28,7 +28,7 @@ public void OnPluginStart() { ConVar cvar; HookConVarChange((cvar = CreateConVar("sm_kr_enabled", "1", "1 = sm_zabuse is available, 0 = sm_zabuse is not available", FCVAR_NONE, true, 0.0, true, 1.0)), g_cvZAbuse); - g_bZAbuse = cvar.BoolValue; + g_bKnifeRevert = cvar.BoolValue; HookConVarChange((cvar = CreateConVar("sm_kr_slay", "0", "1 = slays the knifer automatically when sm_zabuse is used, 0 = don't do anything to the knifer", FCVAR_NONE, true, 0.0, true, 1.0)), g_cvSlayKnifer); g_bSlayKnifer = cvar.BoolValue; HookConVarChange((cvar = CreateConVar("sm_kr_maxdistance", "150.0", "max distance from the zombie that got knifed forward where infected humans will be rezurrected")), g_cvMaxDistance); @@ -39,8 +39,8 @@ public void OnPluginStart() HookEvent("player_hurt", OnPlayerHurt); - RegAdminCmd("sm_kr", Command_ZAbuse, ADMFLAG_GENERIC, "Undoes the damage caused by a zombie after being knifed forward"); - RegAdminCmd("sm_kniferevert", Command_ZAbuse, ADMFLAG_GENERIC, "Undoes the damage caused by a zombie after being knifed forward"); + RegAdminCmd("sm_kr", Command_KnifeRevert, ADMFLAG_GENERIC, "Undoes the damage caused by a zombie after being knifed forward"); + RegAdminCmd("sm_kniferevert", Command_KnifeRevert, ADMFLAG_GENERIC, "Undoes the damage caused by a zombie after being knifed forward"); AutoExecConfig(true, "plugin.KnifeRevert"); @@ -50,7 +50,7 @@ public void OnPluginStart() public void g_cvZAbuse(ConVar convar, const char[] oldValue, const char[] newValue) { - g_bZAbuse = convar.BoolValue; + g_bKnifeRevert = convar.BoolValue; } public void g_cvSlayKnifer(ConVar convar, const char[] oldValue, const char[] newValue) @@ -70,7 +70,7 @@ public void g_cvMaxTime(ConVar convar, const char[] oldValue, const char[] newVa public void OnPlayerHurt(Handle hEvent, const char[] name, bool dontBroadcast) { - if(!g_bZAbuse) + if(!g_bKnifeRevert) return; int attacker; @@ -125,7 +125,7 @@ public Action OnClientKnife(Handle timer) public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, bool respawnOverride, bool respawn) { - if(!g_bZAbuse || !g_bKnife) + if(!g_bKnifeRevert || !g_bKnife) return; static float fVec1[3]; @@ -139,9 +139,9 @@ public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, boo g_bInfectedInRadius[client] = true; } -public Action Command_ZAbuse(int client, int argc) +public Action Command_KnifeRevert(int client, int argc) { - if(!g_bZAbuse) + if(!g_bKnifeRevert) { ReplyToCommand(client, "[SM] Disabled on this Map."); return Plugin_Handled;