"Damage Stats" in GUI

  • Thread starter Thread starter squiddly
  • Start date Start date
S

squiddly

Guest
Hi,

I have tried to implement a server plugin for CS Source, which should display the damage stats, displayed by default in the console after a player has died, in the GUI.
So far all things which are necessary to do this are done and I am able to display messages for he correct player at the correct time (player_death), but until now I have not managed to retrieve the information (other infos e.g. player name... are accesible) about the damage stats.

Does there already exist a method returning this info (somewhere in the sdk) or does somebody has an idea how I could get this info (who was attacked, who attacked the player, how much damage was given and taken, ...) by implementing some methods by myself.

thx a lot for your help,
squiddly
 
Come to think about it, what is the best way to do it? I'm pretty interested, too.

-Angry Lawyer
 
well, one solution i am working on ,is to build a list (adding
Code:
#include <vector>	
#include <list>	
#include <algorithm>
using namespace std;
...
private:
	vector< edict_t * > m_edictList;
)
of all players, this list is always up to date (updated when a player joins or leaves the game), and a self build class queries the player_hit events and stores all retrived data (damage, which weapon, which player) in this list. when the player_death event occurs all damage is calculated and the info will be displayed in the gui.
but i think that this solution could be a little bit slow, haven't tested it in a real game yet, because it isn't finished yet, but this would be a possible solution.
but i wonder if there isn't any existing method inside the SDK i could use for this...

thx
squiddly
 
Back
Top