/* CS Stats functions
 *
 * (c) 2002-2006, OLO
 * This file is provided as is (no warranties).
 */

#if defined _csstats_included
  #endinput
#endif
#define _csstats_included

/* Function is called after a player attacked one another.
* If the victim was attacked by a teammate, TA is set to 1. */
forward damage_info(attacker,victim,damage,wpnindex,hitplace,TA);

/* Function is called when a player dies.
* If the victim was killed by a teammate, TA is set to 1. */
forward death_info(killer,victim,wpnindex,hitplace,TK);

/* Function is called when a grenade is thrown.
* greindex is the index of the entity, wId is the index of the weapon (CSW_xx) */
forward grenade_throw(index,greindex,wId);

/* Function is called when a player is planting the bomb. */
forward bomb_planting(planter);

/* Function is called when a player plants the bomb. */
forward bomb_planted(planter);

/* Function is called when the bomb explodes. */
forward bomb_exploded(planter,defuser);

/* Function is called when a player is defusing the bomb. hasDefuseKit is set to 1 or 0. */
forward bomb_defusing(defuser,hasDefuseKit);

/* Function is called when the bomb is defused. hasDefuseKit is set to 1 or 0. */
forward bomb_defused(defuser,hasDefuseKit);


/* Gets stats from given weapon index. If wpnindex is 0
* then the stats are from all weapons. If weapon has not been used function
* returns 0 in other case 1. Fields in stats are:
* 0 - kills
* 1 - deaths
* 2 - headshots
* 3 - teamkilling
* 4 - shots
* 5 - hits
* 6 - damage
* For body hits fields see amxconst.inc. */
native get_user_wstats(index, wpnindex, stats[8], bodyhits[8]);

/* Gets round stats from given weapon index.*/
native get_user_wrstats(index, wpnindex, stats[8], bodyhits[8]);

/* Gets overall stats which are stored in file on server
* and updated on every respawn or user disconnect.
* Function returns the position in stats by diff. kills to deaths. */
native get_user_stats(index, stats[8], bodyhits[8]);

/* Gets round stats of player. */
native get_user_rstats(index, stats[8], bodyhits[8]);

/* Gets stats with which user has killed/hurt his victim. If victim is 0
* then stats are from all victims. If victim has not been hurt, function
* returns 0 in other case 1. User stats are reset on his respawn. */
native get_user_vstats(index, victim, stats[8], bodyhits[8], wpnname[]="", len=0);

/* Gets stats with which user has been killed/hurt. If attacker is 0
* then stats are from all attacks. If killer has not hurt user, function
* returns 0 in other case 1. User stats are reset on his respawn. */
native get_user_astats(index, attacker, stats[8], bodyhits[8], wpnname[]="", len=0);

/* Resets life, weapon, victims and attackers user stats. */
native reset_user_wstats(index);

/* Gets overall stats which are stored in csstats.dat file in amx/modules folder
* and updated on every mapchange or user disconnect.
* Function returns next index of stats entry or 0 if no more exists. */
native get_stats(index, stats[8], bodyhits[8], name[]="", len=0);

/* Returns number of all entries in stats. */
native get_statsnum();

/******************************************************************************/

/* New Stats
*  0: Bomb Runner
*  1: Bomb Planted
*  2: Bomb Exploded
*  3: Bomb Defusing
*  4: Bomb Defused
*  5: Hostages Touched
*  6: Hostages Rescued
*  7: Was Vip
*  8: Escaped As Vip
*  9: Killed Vip
* 10: Suicides
* 11: Playtime
*/

/* Gets overall stats which are stored in file on server
* and updated on every respawn or user disconnect.
* Function returns the position in stats by diff. kills to deaths. */
native get_user_stats2(index, newStats[12]);

/* Gets overall stats which are stored in csstats.dat file in amx/modules folder
* and updated on every mapchange or user disconnect.
* Function returns next index of stats entry or 0 if no more exists. */
native get_stats2(index, newStats[12], name[]="", len=0);
