// TODO: make these print a newline if they dont
Send_CSQC_Centerprint(attacker, "", "", KILL_FIRST_BLOOD, MSG_KILL);
Send_CSQC_Centerprint(targ, "", "", KILL_FIRST_VICTIM, MSG_KILL);
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD, 1);
+ PlayerStats_Event(targ, PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM, 1);
}
if((autocvar_sv_fragmessage_information_typefrag) && (targ.BUTTON_CHAT)) {
{
Send_KillNotification(a, "", "", KILL_SPREE_3, MSG_SPREE);
AnnounceTo(attacker, "03kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_3, 1);
}
else if (attacker.killcount == 5)
{
Send_KillNotification(a, "", "", KILL_SPREE_5, MSG_SPREE);
AnnounceTo(attacker, "05kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_5, 1);
}
else if (attacker.killcount == 10)
{
Send_KillNotification(a, "", "", KILL_SPREE_10, MSG_SPREE);
AnnounceTo(attacker, "10kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_10, 1);
}
else if (attacker.killcount == 15)
{
Send_KillNotification(a, "", "", KILL_SPREE_15, MSG_SPREE);
AnnounceTo(attacker, "15kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_15, 1);
}
else if (attacker.killcount == 20)
{
Send_KillNotification(a, "", "", KILL_SPREE_20, MSG_SPREE);
AnnounceTo(attacker, "20kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_20, 1);
}
else if (attacker.killcount == 25)
{
Send_KillNotification(a, "", "", KILL_SPREE_25, MSG_SPREE);
AnnounceTo(attacker, "25kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_25, 1);
}
else if (attacker.killcount == 30)
{
Send_KillNotification(a, "", "", KILL_SPREE_30, MSG_SPREE);
AnnounceTo(attacker, "30kills");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_30, 1);
}
LogDeath("frag", deathtype, attacker, targ);
}
GiveFrags(targ, targ, -1, deathtype);
if(PlayerScore_Add(targ, SP_SCORE, 0) == -5) {
AnnounceTo(targ, "botlike");
+ PlayerStats_Event(attacker, PLAYERSTATS_ACHIEVEMENT_BOTLIKE, 1);
}
Send_KillNotification(s, msg, "", deathtype, MSG_KILL_ACTION);
PlayerStats_AddEvent(PLAYERSTATS_ALIVETIME);
PlayerStats_AddEvent(PLAYERSTATS_WINS);
PlayerStats_AddEvent(PLAYERSTATS_MATCHES);
+ PlayerStats_AddEvent(PLAYERSTATS_JOINS);
PlayerStats_AddEvent(PLAYERSTATS_SCOREBOARD_VALID);
+
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_3);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_5);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_10);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_15);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_20);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_25);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_30);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_BOTLIKE);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD);
+ PlayerStats_AddEvent(PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM);
}
void PlayerStats_AddPlayer(entity e)
if(p.cvar_cl_allow_uid2name == 1 || clienttype(p) == CLIENTTYPE_BOT)
db_put(playerstats_db, sprintf("%s:_netname", p.playerstats_id), p.netname);
+ PlayerStats_Event(p, PLAYERSTATS_JOINS, 1);
+
strunzone(p.playerstats_id);
p.playerstats_id = string_null;
}
string PLAYERSTATS_ALIVETIME = "alivetime";
string PLAYERSTATS_WINS = "wins";
string PLAYERSTATS_MATCHES = "matches";
+string PLAYERSTATS_JOINS = "joins";
+string PLAYERSTATS_SCOREBOARD_VALID = "scoreboardvalid";
+
string PLAYERSTATS_TOTAL = "total-";
string PLAYERSTATS_SCOREBOARD = "scoreboard-";
-string PLAYERSTATS_SCOREBOARD_VALID = "scoreboardvalid";
+
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_3 = "achievement-kill-spree-3";
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_5 = "achievement-kill-spree-5";
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_10 = "achievement-kill-spree-10";
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_15 = "achievement-kill-spree-15";
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_20 = "achievement-kill-spree-20";
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_25 = "achievement-kill-spree-25";
+string PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_30 = "achievement-kill-spree-30";
+string PLAYERSTATS_ACHIEVEMENT_BOTLIKE = "achievement-botlike";
+string PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD = "achievement-firstblood";
+string PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM = "achievement-firstvictim";
// delay map switch until this is set
float playerstats_waitforme;