From 611b95c505cf16e4078bfdfaa0ebe74a0714aa5a Mon Sep 17 00:00:00 2001 From: dogan Date: Sun, 19 Jul 2020 00:08:48 +0200 Subject: [PATCH] hlstats: add extra points for a nade kill --- hlstatsx/scripting/hlstatsx_ze.sp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hlstatsx/scripting/hlstatsx_ze.sp b/hlstatsx/scripting/hlstatsx_ze.sp index df634c34..3112185e 100644 --- a/hlstatsx/scripting/hlstatsx_ze.sp +++ b/hlstatsx/scripting/hlstatsx_ze.sp @@ -208,6 +208,20 @@ public void OnClientDeath(Event hEvent, const char[] sEvent, bool bDontBroadcast { g_iKillCount[killer] += 1; } + + char sWepName[64]; + GetEventString(hEvent, "weapon", sWepName, sizeof(sWepName)); + + if (!IsValidClient(client) && !IsValidClient(killer)) + return; + + if(client != killer && GetClientTeam(client) == CS_TEAM_T && StrEqual(sWepName, "hegrenade")) + { + char sPlayerEvent[32]; + Format(sPlayerEvent, sizeof(sPlayerEvent), "ze_h_kill_nade"); + + LH_LogPlayerEvent(client, "triggered", sPlayerEvent, true); + } } //----------------------------------------------------------------------------------------------------