Parent Directory | Revision Log
Revision 1 - (view) (download)
1 : | ian | 1 | /* TFCX Stats functions |
2 : | * | ||
3 : | * (c) 2004, SidLuke | ||
4 : | * This file is provided as is (no warranties). | ||
5 : | */ | ||
6 : | |||
7 : | #if defined _tfcstats_included | ||
8 : | #endinput | ||
9 : | #endif | ||
10 : | #define _tfcstats_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 : | * For body hits fields see amxconst.inc. */ | ||
23 : | native get_user_wstats(index,wpnindex,stats[8],bodyhits[8]); | ||
24 : | |||
25 : | /* Gets round stats from given weapon index.*/ | ||
26 : | native get_user_wrstats(index,wpnindex,stats[8],bodyhits[8]); | ||
27 : | |||
28 : | /* Gets overall stats which are stored in file on server | ||
29 : | * and updated on every respawn or user disconnect. | ||
30 : | * Function returns the position in stats by diff. kills to deaths. */ | ||
31 : | native get_user_stats(index,stats[8],bodyhits[8]); | ||
32 : | |||
33 : | /* Gets round stats of player. */ | ||
34 : | native get_user_rstats(index,stats[8],bodyhits[8]); | ||
35 : | |||
36 : | /* Gets stats with which user have killed/hurt his victim. If victim is 0 | ||
37 : | * then stats are from all victims. If victim has not been hurt, function | ||
38 : | * returns 0 in other case 1. User stats are reset on his respawn. */ | ||
39 : | native get_user_vstats(index,victim,stats[8],bodyhits[8],wpnname[]="",len=0); | ||
40 : | |||
41 : | /* Gets stats with which user have been killed/hurt. If killer is 0 | ||
42 : | * then stats are from all attacks. If killer has not hurt user, function | ||
43 : | * returns 0 in other case 1. User stats are reset on his respawn. */ | ||
44 : | native get_user_astats(index,wpnindex,stats[8],bodyhits[8],wpnname[]="",len=0); | ||
45 : | |||
46 : | /* Resets life, weapon, victims and attackers user stats. */ | ||
47 : | native reset_user_wstats(index); | ||
48 : | |||
49 : | /* Gets overall stats which stored in stats.dat file in amx folder | ||
50 : | * and updated on every mapchange or user disconnect. | ||
51 : | * Function returns next index of stats entry or 0 if no more exists. */ | ||
52 : | native get_stats(index,stats[8],bodyhits[8],name[],len); | ||
53 : | |||
54 : | /* Returns number of all entries in stats. */ | ||
55 : | native get_statsnum(); | ||
56 : |
Contact | ViewVC Help |
Powered by ViewVC 1.0.4 |