Skip to content

Commit

Permalink
Added bot check
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileYzn committed Jan 6, 2024
1 parent f733aa8 commit 11b114c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions CSDM/CSDM_Misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 11b114c

Please sign in to comment.