self.playerid = (playerid_last = playerid_last + 1);
+ PlayerStats_AddEvent(sprintf("kills-%d", self.playerid));
+
if(clienttype(self) == CLIENTTYPE_BOT)
PlayerStats_AddPlayer(self);
{
// regular frag
PlayerScore_Add(attacker, SP_KILLS, 1);
+ if(targ.playerid)
+ PlayerStats_Event(attacker, sprintf("kills-%d", targ.playerid), 1);
}
PlayerScore_Add(targ, SP_DEATHS, 1);
for(p = playerstats_last; (pn = db_get(playerstats_db, sprintf("%s:*", p))) != ""; p = pn)
{
bufstr_set(b, i++, sprintf("P %s", p));
+ nn = db_get(playerstats_db, sprintf("%s:_playerid", p));
+ if(nn != "")
+ bufstr_set(b, i++, sprintf("i %s", nn));
nn = db_get(playerstats_db, sprintf("%s:_netname", p));
if(nn != "")
bufstr_set(b, i++, sprintf("n %s", nn));
if(p.alivetime)
PlayerStats_Event(p, PLAYERSTATS_ALIVETIME, time - p.alivetime);
+
+ db_put(playerstats_db, sprintf("%s:_netname", p.playerstats_id), ftos(p.playerid));
if(p.cvar_cl_allow_uid2name == 1 || clienttype(p) == CLIENTTYPE_BOT)
db_put(playerstats_db, sprintf("%s:_netname", p.playerstats_id), p.netname);