Raised This Month: $114 Target: $400
 28% 

DeathMsg Fix v1.0.3


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Event Related        Approver:   Hawk552 (427)
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 02-14-2007 , 04:46   DeathMsg Fix v1.0.3
Reply With Quote #1

Info (RUS):
* Plugin fixes an absence of DeathMsg (notification) on critical damage. This bug usually occures when player is killed by map entity. Very useful when playing maps with tank/gun/etc entities under CSDM because a dead player will not be respawned automatically in this case.

Requirements:
* CS/CZ mod
* AMX/X 1.7x or higher
* CStrike module

Known issues:
* Bomb Explosion Features plugin (by VEN) may start to work wrong after this plugin has been activated.

History:
1.0.3 [2007-03-10]
! fixed an issue when other plugins, placed below the current plugin
in plugins.ini, got an invalid arguments for Damage event (e.g.
receiver=0, dmg_take=1 instead of valid receiver=1, dmg_take=125)
1.0.2 [2007-03-02]
! avoid dealing with zero player id wihtin onDamage() function (may occure under AXM/X 1.75a)
1.0.1 [2007-02-16]
* removed cstrike mod checking cause cstrike module has already been included
* added public version cvar
1.0.0 [2007-02-14]
* initial release

+101 downloads
Attached Files
File Type: sma Get Plugin or Get Source (deathmsg_fix.sma - 3478 views - 2.9 KB)
__________________
my modest stuff: AXN 1.6.1 | plugins | bsp2csdm

Last edited by Simon Logic; 03-22-2007 at 10:04. Reason: updated to 1.0.3
Simon Logic is offline
Send a message via Skype™ to Simon Logic
godlike
Senior Member
Join Date: Apr 2005
Old 02-14-2007 , 08:30   Re: DeathMsg Fix
Reply With Quote #2

a tank in counterstrike ?
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me
godlike is offline
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 02-14-2007 , 08:32   Re: DeathMsg Fix
Reply With Quote #3

I meant tank entity as class: centry gun, machine gun and any other map entity which kills a player.
__________________
my modest stuff: AXN 1.6.1 | plugins | bsp2csdm
Simon Logic is offline
Send a message via Skype™ to Simon Logic
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 02-14-2007 , 10:25   Re: DeathMsg Fix
Reply With Quote #4

Is there any real point to this check?
if(cstrike_running())

Also, will this if statement ever return false if someone connects and dies (or if DeathMsg is never called through register_event).
if(!(is_user_alive(id) || g_bDeathMsg[id] || g_bCriticalDamage[id]))
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.

Last edited by Lord_Destros; 02-14-2007 at 10:36.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 02-14-2007 , 10:38   Re: DeathMsg Fix
Reply With Quote #5

Quote:
Originally Posted by Lord_Destros View Post
Is there any real point to this check?
if(cstrike_running())
Yes of course. This bug occures only under CS. Under HLDM everything is fine.

Quote:
Originally Posted by Lord_Destros View Post
When someone suicides, if they already gain a death whats the point of this?
cs_set_user_deaths(id, cs_get_user_deaths(id) + 1)

Also why do you bother checking when they take damage rather than when they just die.
You still don't understand what this plugin does. It fixes a BUG when a player got critical Damage but DeathMsg were not sent by the server. Normally DeathMsg is called before critical Damage event.

Quote:
Originally Posted by Lord_Destros View Post
Lastly, will this if statement ever return false if someone connects and dies.
if(!(is_user_alive(id) || g_bDeathMsg[id] || g_bCriticalDamage[id]))
It's a result of optimized boolean expression (may be you've heard about boolean algebra) thus it may be hard to understand an expression. By the way, i always test my plugins before posting them here.
__________________
my modest stuff: AXN 1.6.1 | plugins | bsp2csdm

Last edited by Simon Logic; 02-14-2007 at 10:42.
Simon Logic is offline
Send a message via Skype™ to Simon Logic
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 02-14-2007 , 16:19   Re: DeathMsg Fix
Reply With Quote #6

Quote:
Originally Posted by Simon Logic View Post
Yes of course. This bug occures only under CS. Under HLDM everything is fine.

Hence my point. Why would anyone run this if they aren't using CS. They probably SHOULD get a bad load rather than having a plugin load that does nothing.

You still don't understand what this plugin does. It fixes a BUG when a player got critical Damage but DeathMsg were not sent by the server. Normally DeathMsg is called before critical Damage event.


It's a result of optimized boolean expression (may be you've heard about boolean algebra) thus it may be hard to understand an expression. By the way, i always test my plugins before posting them here.
1. Hence my point. Why would anyone run this if they aren't using CS. They probably SHOULD get a bad load rather than having a plugin load that does nothing.

2. Yeah I misunderstood that

3. if(!(is_user_alive(id) || g_bDeathMsg[id] || g_bCriticalDamage[id])) is the same as
if(!is_user_alive(id) && !g_bDeathMsg[id] && !g_bCriticalDamage[id])
which always appears to return true (assuming 'id' was killed) since every time ResetHUD you set both of them to false.

EDIT:

Shouldn't you also call client_disconnect to ensure the boolean variables are reset to false (If they disconnect before ResetHUD is called)?
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.

Last edited by Lord_Destros; 02-14-2007 at 23:39. Reason: Forgot a closing parenthesis.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Old 02-14-2007, 22:19
Zenith77
This message has been deleted by Hawk552. Reason: flaming in response to Lord_Destros
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 02-14-2007 , 22:24   Re: DeathMsg Fix
Reply With Quote #7

eh isnt the "||" the Logical or operator & the "&&" The and operator
__________________
i stop around here and there.
Da_sk8rboy is offline
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 02-14-2007 , 23:32   Re: DeathMsg Fix
Reply With Quote #8

Quote:
Originally Posted by Da_sk8rboy View Post
eh isnt the "||" the Logical or operator & the "&&" The and operator
Yeah.
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 02-15-2007 , 04:57   Re: DeathMsg Fix
Reply With Quote #9

Quote:
Originally Posted by Lord_Destros View Post
1. Hence my point. Why would anyone run this if they aren't using CS. They probably SHOULD get a bad load rather than having a plugin load that does nothing.
First of all, too many people still can't read attentively. They easily may miss the point that this plugin is for CS only. So question like "Why would anyone run this if they aren't using CS" should never occure. Secondly, the primary rule of good programming habits is to handle every error if possible and print user friendly desciptions (not like those the microsoft put into event log =) ).

Quote:
Originally Posted by Lord_Destros View Post
3. if(!(is_user_alive(id) || g_bDeathMsg[id] || g_bCriticalDamage[id])) is the same as
if(!is_user_alive(id) && !g_bDeathMsg[id] && !g_bCriticalDamage[id])
which always appears to return true (assuming 'id' was killed) since every time ResetHUD you set both of them to false.
onPlayerSpawn() is called on alive players only. g_bCriticalDamage was introduced to filter out other Damage events after a bug was catched. Otherwise my plugin could send more than one DeathMsg during single death.

Quote:
Originally Posted by Lord_Destros View Post
Shouldn't you also call client_disconnect to ensure the boolean variables are reset to false (If they disconnect before ResetHUD is called)?
Simple answer - try/test it. I suppose it can not occure.

Yesterday i discovered that this plugin fixes DeathMsg absence for C4 kill. So if you're using plugin which allows to plant C4 everywhere, may be it's for you too. By the way, this plugin may be incompatible with VEN's Bomb Explosion Features.
__________________
my modest stuff: AXN 1.6.1 | plugins | bsp2csdm

Last edited by Simon Logic; 02-15-2007 at 05:28.
Simon Logic is offline
Send a message via Skype™ to Simon Logic
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 02-15-2007 , 10:01   Re: DeathMsg Fix
Reply With Quote #10

Quote:
Originally Posted by Simon Logic View Post
First of all, too many people still can't read attentively. They easily may miss the point that this plugin is for CS only. So question like "Why would anyone run this if they aren't using CS" should never occure. Secondly, the primary rule of good programming habits is to handle every error if possible and print user friendly desciptions (not like those the microsoft put into event log =) ).
You never printed a user friendly description of that error XD, you just had it run and do nothing if the server isn't running CS.
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:56.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode