Raised This Month: $ Target: $400
 0% 

Solved How to achieve cumulative effect on death pool?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
damage220
Senior Member
Join Date: Jul 2022
Location: Ukraine
Old 12-02-2022 , 12:33   How to achieve cumulative effect on death pool?
Reply With Quote #1

Hi, guys. I cannot figure out how to summarize all kills made with, say, he grenade or awp. I want to allow players to set money showing their kills and the problem here is not to update money, since I have all the necessary messages, but a fact that game engine processes death messages one by one and so when someone kills multiple enemies at once, the hud always shows +1 kill, though the total number of kills is correct. I want it to be cumulative, how to make it show +2, ..., +5 kills? I did some message logging, and here is what I got:
PHP Code:
[36.621555ham_killed_pre
[36.621555DeathMsg (83)
[
36.621555death_event
[36.621555Health (70)
[
36.621555ham_killed_post
[36.621555ham_killed_pre
[36.621555DeathMsg (83)
[
36.621555death_event
[36.621555Health (70)
[
36.621555ham_killed_post
[36.621555ham_killed_pre
[36.621555DeathMsg (83)
[
36.621555death_event
[36.621555Health (70)
[
36.621555ham_killed_post
[36.621555ham_killed_pre
[36.621555DeathMsg (83)
[
36.621555death_event
[36.621555Health (70)
[
36.621555ham_killed_post
killed phillip_style with grenade
killed -=Sh0rTy=- with grenade
killed bussemann with grenade
killed The Muffin Man with grenade
[36.630783Health (70)
[
36.630783Damage (71)
client_death36.630783
[36.630783Health (70)
[
36.630783Damage (71)
client_death36.630783
[36.634681Health (70)
[
36.661983Health (70)
[
36.661983Damage (71)
client_death36.661983
[36.661983Health (70)
[
36.661983Damage (71)
client_death36.661983
[36.794578death_msg_timer
[36.794578death_msg_timer
[36.794578death_msg_timer
[36.794578death_msg_timer 
You can see that most vital DeathMsg messages are all at one frame with gametime: 36.621555. The problem here is that I do not know where the last kill is. So I need something that is called after all these messages and to be sure it is called all the time.
1. I wish I could rely on client_death, but this forward is not triggered on suicide (team change) or amxmodx user_slap( function.
2. I tried to use set_task_ex(0.01, "death_msg_timer") to set a timer, but for some reason it takes too much time to execute the code (173 ms)
3. Damage message appears to be triggered after all DeathMsg messages, but again it is not triggered on team change, etc...
I completely lost at this point. Is the timer single possible solution to this problem? Except client_preThink which I do not want to consider actually.

Is it possible to somehow catch these console messages?
PHP Code:
killed phillip_style with grenade
killed -=Sh0rTy=- with grenade
killed bussemann with grenade
killed The Muffin Man with grenade 
They have perfect timing)

Ps: for those who have no idea what I am talking about, please see attachments (notice +1 above 4).
Attached Thumbnails
Click image for larger version

Name:	20221202192746_1.jpg
Views:	90
Size:	86.6 KB
ID:	198281  

Last edited by damage220; 12-02-2022 at 13:41.
damage220 is offline
 



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 15:38.


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