Add constants for stats functions (#509)

* Add constants for stats functions

* Changed STATS_ to STATSX_ and added 2 more defines

* Added constants for all games

* Add csstats_const.inc and add _MAX_ constats to enum

* Change bodyhits
This commit is contained in:
OciXCrom
2018-08-25 20:52:48 +02:00
committed by Vincent Herbet
parent 197db8c82b
commit 8aeefc3fca
10 changed files with 118 additions and 33 deletions

View File

@@ -28,34 +28,34 @@
* 6 - damage
* 7 - score
* For body hits fields see amxconst.inc. */
native get_user_wstats(index,wpnindex,stats[9],bodyhits[8]);
native get_user_wstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
/* Gets round stats from given weapon index.*/
native get_user_wrstats(index,wpnindex,stats[9],bodyhits[8]);
native get_user_wrstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
/* Gets life (from spawn to spawn) stats from given weapon index.*/
native get_user_wlstats(index,wpnindex,stats[9],bodyhits[8]);
native get_user_wlstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
/* 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[9],bodyhits[8]);
native get_user_stats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
/* Gets round stats of player. */
native get_user_rstats(index,stats[9],bodyhits[8]);
native get_user_rstats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
/* Gets life (from spawn to spawn) stats of player. */
native get_user_lstats(index,stats[9],bodyhits[8]);
native get_user_lstats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
/* Gets stats with which user have 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[9],bodyhits[8],wpnname[]="",len=0);
native get_user_vstats(index,victim,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0);
/* Gets stats with which user have been killed/hurt. If killer 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,wpnindex,stats[9],bodyhits[8],wpnname[]="",len=0);
native get_user_astats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0);
/* Resets life, weapon, victims and attackers user stats. */
native reset_user_wstats(index);
@@ -63,7 +63,7 @@ native reset_user_wstats(index);
/* Gets overall stats which stored in stats.dat file in amx 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[9],bodyhits[8],name[],len);
native get_stats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len);
/* Returns number of all entries in stats. */
native get_statsnum();