PlayerStats_AddEvent(PLAYERSTATS_MATCHES);
PlayerStats_AddEvent(PLAYERSTATS_JOINS);
PlayerStats_AddEvent(PLAYERSTATS_SCOREBOARD_VALID);
- PlayerStats_AddEvent(PLAYERSTATS_TEAM);
+ PlayerStats_AddEvent(PLAYERSTATS_RANK);
PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_3);
PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_5);
total-<scoreboardname>: total score of that scoreboard item
scoreboard-<scoreboardname>: end-of-game score of that scoreboard item (can differ in non-team games)
achievement-<achievementname>: achievement counters
- player-rank <number>: rank of player
+ rank <number>: rank of player
*/
//#NO AUTOCVARS START
bufstr_set(b, i++, sprintf("C %d", cvar_purechanges_count));
if(teams_matter)
{
+ entity winner;
+ winner = PlayerScore_Sort(score_dummyfield);
+ bufstr_set(b, i++, sprintf("W %d", winner.team));
for(t = teamstats_last; (tn = db_get(playerstats_db, sprintf("%s", t))) != ""; t = tn)
{
bufstr_set(b, i++, strcat("t ", t));
}
bufstr_set(b, i++, "");
}
- bufstr_set(b, i++, "");
}
else {
for(p = playerstats_last; (pn = db_get(playerstats_db, sprintf("%s:*", p))) != ""; p = pn)
void PlayerStats_EndMatch(float finished)
{
- entity p;
+ entity p, winner;
+ winner = PlayerScore_Sort(score_dummyfield);
FOR_EACH_PLAYER(p)
{
PlayerScore_PlayerStats(p);
{
PlayerStats_Event(p, PLAYERSTATS_WINS, p.winning);
PlayerStats_Event(p, PLAYERSTATS_MATCHES, 1);
+ PlayerStats_Event(p, PLAYERSTATS_RANK, p.score_dummyfield);
}
}
}
string PLAYERSTATS_MATCHES = "matches";
string PLAYERSTATS_JOINS = "joins";
string PLAYERSTATS_SCOREBOARD_VALID = "scoreboardvalid";
-string PLAYERSTATS_TEAM = "team";
+string PLAYERSTATS_RANK = "rank";
string PLAYERSTATS_TOTAL = "total-";
string PLAYERSTATS_SCOREBOARD = "scoreboard-";