Raised This Month: $52 Target: $400
 13% 

New player_death thing; Killstreak stuff


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 02-03-2014 , 23:14   New player_death thing; Killstreak stuff
Reply With Quote #1

So I noticed there's this stuff in the player_death event:

Code:
 
kill_streak_total   Kill streak count (level)
kill_streak_wep   Kill streak for killing weapon
kill_streak_assist   Kill streak for assister count
kill_streak_victim   Victims kill streak
Anyone know how to properly use this stuff now? I ask because I have some ideas for how this stuff could be used (i.e. adding in bonus points for hitting certain killstreaks in the TF2 Stats plugin, or re-doing the existing TF2 "kill streak" plugins to use this stuff instead of coded-in kill-streak checks and timers and such.

I got this far before I went "Wait, how does this know that it's checking the ATTACKER'S killstreak, and not the victim's?" and then spaced out:

PHP Code:
new killstreak GetEventInt(event"kill_streak_total"); 
I think that code needs to be tied into an attacker check of some sort to verify whose killstreak the plugin is checking, but as I said before, I spaced out and don't know where to go from here.
__________________

404UNF is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 02-04-2014 , 01:22   Re: New player_death thing; Killstreak stuff
Reply With Quote #2

On a similar note, if I set m_iKillstreaks to something through code, the client who's streaks were changed suddenly has their auth ticket canceled as their game crashes...

(Sorry for the slight hijack).
__________________
Chdata is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 02-04-2014 , 03:04   Re: New player_death thing; Killstreak stuff
Reply With Quote #3

Quote:
Originally Posted by Chdata View Post
On a similar note, if I set m_iKillstreaks to something through code, the client who's streaks were changed suddenly has their auth ticket canceled as their game crashes...

(Sorry for the slight hijack).
S'ok (it's topical, so I'll allow it)
__________________

404UNF is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 02-04-2014 , 11:45   Re: New player_death thing; Killstreak stuff
Reply With Quote #4

Not sure i understand the OP's question..
They are all shorts so you use GetEventInt on them
if you want to find out on your own then just test out each value on a bot or something.
__________________
Mitchell is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-04-2014 , 13:53   Re: New player_death thing; Killstreak stuff
Reply With Quote #5

As a reminder, events are a notification of things that already happened.

player_death is the event that populates the killfeed for players. It MAY also be responsible for displaying the messages about killstreaks starting (for attacker/assister) or ending (victim), but it's possible that another event or UserMessage does that.

As you can see from the event's other fields, you already have the various players userids (note: not player indexes) needed to determine who the attacker, assister, and victim (userid) all are.
__________________
Am I back? Well, we'll see.

Last edited by Powerlord; 02-04-2014 at 13:56.
Powerlord is offline
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 16:38.


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