Skip to content

Commit ec43414

Browse files
authored
Fixed variables logic
Fixed variables logic
1 parent d19f151 commit ec43414

File tree

1 file changed

+15
-52
lines changed

1 file changed

+15
-52
lines changed

CSDM/CSDM_Misc.cpp

Lines changed: 15 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -129,38 +129,27 @@ void CCSDM_Misc::PlayerKilled(CBasePlayer* Victim, CBasePlayer* Killer)
129129
if (Victim->m_bHeadshotKilled)
130130
{
131131
this->m_Headshots[Killer->entindex()]++;
132-
}
133132

134-
if (this->m_kill_fade->value > 0.0f)
135-
{
136-
if (Victim->m_bHeadshotKilled)
133+
if (this->m_kill_fade->value == 2.0f)
137134
{
138-
if (this->m_kill_fade->value == 2.0f)
139-
{
140-
gCSDM_Util.ScreenFade(Killer->edict(), BIT(10), BIT(10), 0x0000, 0, 0, 200, 75);
141-
}
135+
gCSDM_Util.ScreenFade(Killer->edict(), BIT(10), BIT(10), 0x0000, 0, 0, 200, 75);
142136
}
143-
else
137+
138+
if (this->m_kill_sound->value == 2.0f)
144139
{
145-
gCSDM_Util.ScreenFade(Killer->edict(), BIT(10), BIT(10), 0x0000, 0, 0, 200, 75);
140+
g_engfuncs.pfnClientCommand(Killer->edict(), "%s", "speak \"sound/fvox/blip.wav\"\n");
146141
}
147142
}
148-
149-
if (this->m_kill_sound->value > 0.0f)
143+
else
150144
{
151-
if (!Killer->IsBot())
145+
if (this->m_kill_fade->value == 1.0f)
152146
{
153-
if (Victim->m_bHeadshotKilled)
154-
{
155-
if (this->m_kill_sound->value == 2.0f)
156-
{
157-
g_engfuncs.pfnClientCommand(Killer->edict(), "%s", "speak \"sound/fvox/blip.wav\"\n");
158-
}
159-
}
160-
else
161-
{
162-
g_engfuncs.pfnClientCommand(Killer->edict(), "%s", "speak \"sound/fvox/blip.wav\"\n");
163-
}
147+
gCSDM_Util.ScreenFade(Killer->edict(), BIT(10), BIT(10), 0x0000, 0, 0, 200, 75);
148+
}
149+
150+
if (this->m_kill_sound->value == 1.0f)
151+
{
152+
g_engfuncs.pfnClientCommand(Killer->edict(), "%s", "speak \"sound/fvox/blip.wav\"\n");
164153
}
165154
}
166155

@@ -194,7 +183,7 @@ void CCSDM_Misc::PlayerKilled(CBasePlayer* Victim, CBasePlayer* Killer)
194183
}
195184
}
196185

197-
if (this->m_reload_on_kill->value || 1)
186+
if (this->m_reload_on_kill->value > 0.0f)
198187
{
199188
if (Killer->m_pActiveItem)
200189
{
@@ -260,32 +249,6 @@ int CCSDM_Misc::AddAccount(CBasePlayer* Player, int Amount)
260249
return Amount;
261250
}
262251

263-
/*
264-
#include <amxmodx>
265-
266-
#define PLUGIN "Only Your Info on DM"
267-
#define VERSION "0.1"
268-
#define AUTHOR "Dev-cs.ru"
269-
270-
public plugin_init()
271-
{
272-
register_plugin(PLUGIN, VERSION, AUTHOR)
273-
register_message(get_user_msgid("DeathMsg"), "msg_deathMsg")
274-
}
275-
public msg_deathMsg(msgid, dest, receiver)
276-
{
277-
enum { arg_killer = 1, arg_victim };
278-
279-
new killer = get_msg_arg_int(arg_killer);
280-
new victim = get_msg_arg_int(arg_victim);
281-
282-
if (killer == receiver || victim == receiver) {
283-
return PLUGIN_CONTINUE;
284-
}
285-
286-
return PLUGIN_HANDLED;
287-
}*/
288-
289252
bool CCSDM_Misc::SendDeathMessage(CBaseEntity* Killer, CBasePlayer* Victim, CBasePlayer* Assister, entvars_t* pevInflictor, const char* killerWeaponName, int iDeathMessageFlags, int iRarityOfKill)
290253
{
291254
if (this->m_hide_kill_feed)
@@ -401,4 +364,4 @@ bool CCSDM_Misc::TraceLine(const float* start, const float* end, int fNoMonsters
401364
}
402365

403366
return false;
404-
}
367+
}

0 commit comments

Comments
 (0)