From 1dd5dbd61e7acb1ef034ce5144240b6cc11ddc4f Mon Sep 17 00:00:00 2001 From: neon <> Date: Tue, 20 Nov 2018 20:04:45 +0100 Subject: [PATCH] never c&p code blindly --- BossHP/scripting/BossHP_Ranking.sp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BossHP/scripting/BossHP_Ranking.sp b/BossHP/scripting/BossHP_Ranking.sp index bcfe98f0..06574f42 100644 --- a/BossHP/scripting/BossHP_Ranking.sp +++ b/BossHP/scripting/BossHP_Ranking.sp @@ -271,7 +271,10 @@ public Action EventHook_PlayerDeath(Event hEvent, const char[] sEventName, bool int iAttacker = GetClientOfUserId(hEvent.GetInt("attacker")); - if (!IsValidClient(iAttacker) || !ZR_IsClientHuman(iAttacker)) + if (!IsValidClient(iAttacker)) + return Plugin_Continue; + + if (IsPlayerAlive(iAttacker) && !ZR_IsClientHuman(iAttacker)) return Plugin_Continue; int iPacked = (iAttacker<<16) | (GetEntProp(iAttacker, Prop_Send, "m_iAccount")&0xFFFF);