i: player index
e: followed by an event name, a space, and the event count/score
event names can be:
- alivetime: total playing time of the player
+ alivetime: total playing time of the uplayer
avglatency: average network latency compounded throughout the match
wins: number of games won (can only be set if matches is set)
matches: number of matches played to the end (not aborted by map switch)
}
.float scoreboard_pos;
+.float playerrank;
+.float teamrank;
void PlayerStats_EndMatch(float finished)
{
entity p;
- PlayerScore_Sort(score_dummyfield, 0, 0);
+ PlayerScore_Sort(playerrank, 0, 0);
+ if(teamplay)
+ PlayerScore_Sort(teamrank, -1, 0);
PlayerScore_Sort(scoreboard_pos, 1, 1);
FOR_EACH_CLIENT(p) // spectators intentionally not included
{
{
PlayerStats_Event(p, PLAYERSTATS_WINS, p.winning);
PlayerStats_Event(p, PLAYERSTATS_MATCHES, 1);
- PlayerStats_Event(p, PLAYERSTATS_RANK, p.score_dummyfield);
+ PlayerStats_Event(p, PLAYERSTATS_RANK, p.playerrank);
+ if(teamplay)
+ PlayerStats_Event(p, PLAYERSTATS_TEAMRANK, p.teamrank);
PlayerStats_Event(p, PLAYERSTATS_SCOREBOARD_POS, p.scoreboard_pos);
}
}
string PLAYERSTATS_JOINS = "joins";
string PLAYERSTATS_SCOREBOARD_VALID = "scoreboardvalid";
string PLAYERSTATS_RANK = "rank";
+string PLAYERSTATS_TEAMRANK = "teamrank";
string PLAYERSTATS_SCOREBOARD_POS = "scoreboardpos";
string PLAYERSTATS_TOTAL = "total-";