]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/playerstats.qh
add counts to the accuracy system (amount of shots fired, amount of shots hit) but...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / playerstats.qh
1 // time the player was alive and kicking
2 string PLAYERSTATS_ALIVETIME  = "alivetime";
3 string PLAYERSTATS_WINS = "wins";
4 string PLAYERSTATS_MATCHES = "matches";
5 string PLAYERSTATS_JOINS = "joins";
6 string PLAYERSTATS_SCOREBOARD_VALID = "scoreboardvalid";
7 string PLAYERSTATS_RANK = "rank";
8
9 string PLAYERSTATS_ACC_LASER_HIT = "acc-laser-hit";
10 string PLAYERSTATS_ACC_LASER_FIRED = "acc-laser-fired";
11 string PLAYERSTATS_ACC_SHOTGUN_HIT = "acc-sg-hit";
12 string PLAYERSTATS_ACC_SHOTGUN_FIRED = "acc-sg-fired";
13 string PLAYERSTATS_ACC_UZI_HIT = "acc-uzi-hit";
14 string PLAYERSTATS_ACC_UZI_FIRED = "acc-uzi-fired";
15 string PLAYERSTATS_ACC_GRENADE_LAUNCHER_HIT = "acc-gl-hit";
16 string PLAYERSTATS_ACC_GRENADE_LAUNCHER_FIRED = "acc-gl-fired";
17 string PLAYERSTATS_ACC_ELECTRO_HIT = "acc-electro-hit";
18 string PLAYERSTATS_ACC_ELECTRO_FIRED = "acc-electro-fired";
19 string PLAYERSTATS_ACC_CRYLINK_HIT = "acc-crylink-hit";
20 string PLAYERSTATS_ACC_CRYLINK_FIRED = "acc-crylink-fired";
21 string PLAYERSTATS_ACC_NEX_HIT = "acc-nex-hit";
22 string PLAYERSTATS_ACC_NEX_FIRED = "acc-nex-fired";
23 string PLAYERSTATS_ACC_HAGAR_HIT = "acc-hagar-hit";
24 string PLAYERSTATS_ACC_HAGAR_FIRED = "acc-hagar-fired";
25 string PLAYERSTATS_ACC_ROCKET_LAUNCHER_HIT = "acc-rl-hit";
26 string PLAYERSTATS_ACC_ROCKET_LAUNCHER_FIRED = "acc-rl-fired";
27 string PLAYERSTATS_ACC_MINSTANEX_HIT = "acc-minstanex-hit";
28 string PLAYERSTATS_ACC_MINSTANEX_FIRED = "acc-minstanex-fired";
29 string PLAYERSTATS_ACC_SNIPERRIFLE_HIT = "acc-rifle-hit";
30 string PLAYERSTATS_ACC_SNIPERRIFLE_FIRED = "acc-rifle-fired";
31 string PLAYERSTATS_ACC_FIREBALL_HIT = "acc-fireball-hit";
32 string PLAYERSTATS_ACC_FIREBALL_FIRED = "acc-fireball-fired";
33 string PLAYERSTATS_ACC_MINE_LAYER_HIT = "acc-minelayer-hit";
34 string PLAYERSTATS_ACC_MINE_LAYER_FIRED = "acc-minelayer-fired";
35 string PLAYERSTATS_ACC_SEEKER_HIT = "acc-seeker-hit";
36 string PLAYERSTATS_ACC_SEEKER_FIRED = "acc-seeker-fired";
37 string PLAYERSTATS_ACC_TUBA_HIT = "acc-tuba-hit";
38 string PLAYERSTATS_ACC_TUBA_FIRED = "acc-tuba-fired";
39
40 string PLAYERSTATS_ACC_LASER_CNT_HIT = "acc-laser-cnt-hit";
41 string PLAYERSTATS_ACC_LASER_CNT_FIRED = "acc-laser-cnt-fired";
42 string PLAYERSTATS_ACC_SHOTGUN_CNT_HIT = "acc-sg-cnt-hit";
43 string PLAYERSTATS_ACC_SHOTGUN_CNT_FIRED = "acc-sg-cnt-fired";
44 string PLAYERSTATS_ACC_UZI_CNT_HIT = "acc-uzi-cnt-hit";
45 string PLAYERSTATS_ACC_UZI_CNT_FIRED = "acc-uzi-cnt-fired";
46 string PLAYERSTATS_ACC_GRENADE_LAUNCHER_CNT_HIT = "acc-gl-cnt-hit";
47 string PLAYERSTATS_ACC_GRENADE_LAUNCHER_CNT_FIRED = "acc-gl-cnt-fired";
48 string PLAYERSTATS_ACC_ELECTRO_CNT_HIT = "acc-electro-cnt-hit";
49 string PLAYERSTATS_ACC_ELECTRO_CNT_FIRED = "acc-electro-cnt-fired";
50 string PLAYERSTATS_ACC_CRYLINK_CNT_HIT = "acc-crylink-cnt-hit";
51 string PLAYERSTATS_ACC_CRYLINK_CNT_FIRED = "acc-crylink-cnt-fired";
52 string PLAYERSTATS_ACC_NEX_CNT_HIT = "acc-nex-cnt-hit";
53 string PLAYERSTATS_ACC_NEX_CNT_FIRED = "acc-nex-cnt-fired";
54 string PLAYERSTATS_ACC_HAGAR_CNT_HIT = "acc-hagar-cnt-hit";
55 string PLAYERSTATS_ACC_HAGAR_CNT_FIRED = "acc-hagar-cnt-fired";
56 string PLAYERSTATS_ACC_ROCKET_LAUNCHER_CNT_HIT = "acc-rl-cnt-hit";
57 string PLAYERSTATS_ACC_ROCKET_LAUNCHER_CNT_FIRED = "acc-rl-cnt-fired";
58 string PLAYERSTATS_ACC_MINSTANEX_CNT_HIT = "acc-minstanex-cnt-hit";
59 string PLAYERSTATS_ACC_MINSTANEX_CNT_FIRED = "acc-minstanex-cnt-fired";
60 string PLAYERSTATS_ACC_SNIPERRIFLE_CNT_HIT = "acc-rifle-cnt-hit";
61 string PLAYERSTATS_ACC_SNIPERRIFLE_CNT_FIRED = "acc-rifle-cnt-fired";
62 string PLAYERSTATS_ACC_FIREBALL_CNT_HIT = "acc-fireball-cnt-hit";
63 string PLAYERSTATS_ACC_FIREBALL_CNT_FIRED = "acc-fireball-cnt-fired";
64 string PLAYERSTATS_ACC_MINE_LAYER_CNT_HIT = "acc-minelayer-cnt-hit";
65 string PLAYERSTATS_ACC_MINE_LAYER_CNT_FIRED = "acc-minelayer-cnt-fired";
66 string PLAYERSTATS_ACC_SEEKER_CNT_HIT = "acc-seeker-cnt-hit";
67 string PLAYERSTATS_ACC_SEEKER_CNT_FIRED = "acc-seeker-cnt-fired";
68 string PLAYERSTATS_ACC_TUBA_CNT_HIT = "acc-tuba-cnt-hit";
69 string PLAYERSTATS_ACC_TUBA_CNT_FIRED = "acc-tuba-cnt-fired";
70
71 string PLAYERSTATS_TOTAL = "total-";
72 string PLAYERSTATS_SCOREBOARD = "scoreboard-";
73
74 string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_3 = "achievement-kill-spree-3";
75 string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_5 = "achievement-kill-spree-5";
76 string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_10 = "achievement-kill-spree-10";
77 string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_15 = "achievement-kill-spree-15";
78 string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_20 = "achievement-kill-spree-20";
79 string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_25 = "achievement-kill-spree-25";
80 string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_30 = "achievement-kill-spree-30";
81 string PLAYERSTATS_ACHIEVEMENT_BOTLIKE = "achievement-botlike";
82 string PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD = "achievement-firstblood";
83 string PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM = "achievement-firstvictim";
84
85 // delay map switch until this is set
86 float playerstats_waitforme;
87
88 // call at initialization
89 void PlayerStats_Init();
90
91 // add a new player
92 void PlayerStats_AddPlayer(entity e);
93
94 // add a new team
95 void PlayerStats_AddTeam(float t);
96
97 // add a new event
98 void PlayerStats_AddEvent(string event_id);
99
100 // call on each event to track, or at player disconnect OR match end for "global stuff"
101 void PlayerStats_Event(entity e, string event_id, float value);
102
103 // add a team score
104 void PlayerStats_TeamScore(float t, string event_id, float value);
105
106 // call at game over
107 void PlayerStats_Shutdown(); // send stats to the server
108
109 // URI GET callback
110 void PlayerStats_Sent_URI_Get_Callback(float id, float status, string data);
111
112 // call this whenever a player leaves
113 void PlayerStats_AddGlobalInfo(entity p);
114
115 // call this at the end of the match
116 void PlayerStats_EndMatch(float finished);