From 11b114c3496694ec8169615a39810289e4bebd9a Mon Sep 17 00:00:00 2001 From: SmileY Date: Sat, 6 Jan 2024 17:03:26 -0300 Subject: [PATCH] Added bot check --- CSDM/CSDM_Misc.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/CSDM/CSDM_Misc.cpp b/CSDM/CSDM_Misc.cpp index d7c2eb7..f3d6a20 100644 --- a/CSDM/CSDM_Misc.cpp +++ b/CSDM/CSDM_Misc.cpp @@ -148,17 +148,20 @@ void CCSDM_Misc::PlayerKilled(CBasePlayer* Victim, CBasePlayer* Killer) if (this->m_kill_sound->value > 0.0f) { - if (Victim->m_bHeadshotKilled) + if (!Killer->IsBot()) { - if (this->m_kill_sound->value == 2.0f) + if (Victim->m_bHeadshotKilled) + { + if (this->m_kill_sound->value == 2.0f) + { + g_engfuncs.pfnClientCommand(Killer->edict(), "%s", "speak \"sound/fvox/blip.wav\"\n"); + } + } + else { g_engfuncs.pfnClientCommand(Killer->edict(), "%s", "speak \"sound/fvox/blip.wav\"\n"); } } - else - { - g_engfuncs.pfnClientCommand(Killer->edict(), "%s", "speak \"sound/fvox/blip.wav\"\n"); - } } if (this->m_kill_hp->value > 0.0f || this->m_kill_hp_hs->value > 0.0f)