[Half-Life AMXX] / include / dodstats.inc Repository:
ViewVC logotype

Annotation of /include/dodstats.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : ian 1 /* DoDX Stats functions
2 :     *
3 :     * (c) 2004, SidLuke
4 :     * This file is provided as is (no warranties).
5 :     */
6 :    
7 :     #if defined _dodstats_included
8 :     #endinput
9 :     #endif
10 :     #define _dodstats_included
11 :    
12 :     /* Gets stats from given weapon index. If wpnindex is 0
13 :     * then the stats are from all weapons. If weapon has not been used function
14 :     * returns 0 in other case 1. Fields in stats are:
15 :     * 0 - kills
16 :     * 1 - deaths
17 :     * 2 - headshots
18 :     * 3 - teamkilling
19 :     * 4 - shots
20 :     * 5 - hits
21 :     * 6 - damage
22 :     * 7 - score
23 :     * For body hits fields see amxconst.inc. */
24 :     native get_user_wstats(index,wpnindex,stats[9],bodyhits[8]);
25 :    
26 :     /* Gets round stats from given weapon index.*/
27 :     native get_user_wrstats(index,wpnindex,stats[9],bodyhits[8]);
28 :    
29 :     /* Gets life (from spawn to spawn) stats from given weapon index.*/
30 :     native get_user_wlstats(index,wpnindex,stats[9],bodyhits[8]);
31 :    
32 :     /* Gets overall stats which are stored in file on server
33 :     * and updated on every respawn or user disconnect.
34 :     * Function returns the position in stats by diff. kills to deaths. */
35 :     native get_user_stats(index,stats[9],bodyhits[8]);
36 :    
37 :     /* Gets round stats of player. */
38 :     native get_user_rstats(index,stats[9],bodyhits[8]);
39 :    
40 :     /* Gets life (from spawn to spawn) stats of player. */
41 :     native get_user_lstats(index,stats[9],bodyhits[8]);
42 :    
43 :     /* Gets stats with which user have killed/hurt his victim. If victim is 0
44 :     * then stats are from all victims. If victim has not been hurt, function
45 :     * returns 0 in other case 1. User stats are reset on his respawn. */
46 :     native get_user_vstats(index,victim,stats[9],bodyhits[8],wpnname[]="",len=0);
47 :    
48 :     /* Gets stats with which user have been killed/hurt. If killer is 0
49 :     * then stats are from all attacks. If killer has not hurt user, function
50 :     * returns 0 in other case 1. User stats are reset on his respawn. */
51 :     native get_user_astats(index,wpnindex,stats[9],bodyhits[8],wpnname[]="",len=0);
52 :    
53 :     /* Resets life, weapon, victims and attackers user stats. */
54 :     native reset_user_wstats(index);
55 :    
56 :     /* Gets overall stats which stored in stats.dat file in amx folder
57 :     * and updated on every mapchange or user disconnect.
58 :     * Function returns next index of stats entry or 0 if no more exists. */
59 :     native get_stats(index,stats[9],bodyhits[8],name[],len);
60 :    
61 :     /* Returns number of all entries in stats. */
62 :     native get_statsnum();
63 :    

Contact
ViewVC Help
Powered by ViewVC 1.0.4