return; // we still have active players on two or more teams, nobody won yet
entity e, winner;
- string teamname;
winner = world;
FOR_EACH_PLAYER(e)
if(winner != world) // just in case a winner wasn't found
{
- if(winner.team == COLOR_TEAM1)
- teamname = "^1Red Team";
- else if(winner.team == COLOR_TEAM2)
- teamname = "^4Blue Team";
- else if(winner.team == COLOR_TEAM3)
- teamname = "^3Yellow Team";
- else
- teamname = "^6Pink Team";
- FOR_EACH_PLAYER(e) {
- centerprint(e, strcat(teamname, "^5 wins the round, all other teams were frozen.\n"));
- }
- bprint(teamname, "^5 wins the round since all the other teams were frozen.\n");
+ Send_Notification(NOTIF_ALL, world, MSG_CENTER, APP_TEAM_NUM_4(winner.team, CENTER_FREEZETAG_ROUND_WIN_));
+ Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_NUM_4(winner.team, INFO_FREEZETAG_ROUND_WIN_));
TeamScore_AddToTeam(winner.team, ST_SCORE, +1);
}
{
if(self.freezetag_frozen == 0 && self.health >= 1)
{
- if(self.team == COLOR_TEAM1)
+ if(self.team == NUM_TEAM_1)
--redalive;
- else if(self.team == COLOR_TEAM2)
+ else if(self.team == NUM_TEAM_2)
--bluealive;
- else if(self.team == COLOR_TEAM3)
+ else if(self.team == NUM_TEAM_3)
--yellowalive;
- else if(self.team == COLOR_TEAM4)
+ else if(self.team == NUM_TEAM_4)
--pinkalive;
--totalalive;
}
{
if(self.freezetag_frozen == 0)
{
- if(self.team == COLOR_TEAM1)
+ if(self.team == NUM_TEAM_1)
--redalive;
- else if(self.team == COLOR_TEAM2)
+ else if(self.team == NUM_TEAM_2)
--bluealive;
- else if(self.team == COLOR_TEAM3)
+ else if(self.team == NUM_TEAM_3)
--yellowalive;
- else if(self.team == COLOR_TEAM4)
+ else if(self.team == NUM_TEAM_4)
--pinkalive;
--totalalive;
if(frag_attacker == frag_target || frag_attacker == world)
{
if(frag_target.classname == STR_PLAYER)
- centerprint(frag_target, "^1You froze yourself.\n");
- bprint("^7", frag_target.netname, "^1 froze himself.\n");
+ Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_FREEZETAG_SELF);
+ Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_SELF, frag_target.netname);
}
else
{
if(frag_target.classname == STR_PLAYER)
- centerprint(frag_target, strcat("^1You were frozen by ^7", frag_attacker.netname, ".\n"));
+ Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_FREEZETAG_FROZEN, frag_attacker.netname);
if(frag_attacker.classname == STR_PLAYER)
- centerprint(frag_attacker, strcat("^2You froze ^7", frag_target.netname, ".\n"));
- bprint("^7", frag_target.netname, "^1 was frozen by ^7", frag_attacker.netname, ".\n");
+ Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_FREEZETAG_FREEZE, frag_target.netname);
+ Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_FREEZE, frag_target.netname, frag_attacker.netname);
}
frag_target.health = 1; // "respawn" the player :P
}
if(warmup && time > warmup) // spawn too late, freeze player
{
- centerprint(self, "^1You spawned after the round started, you'll spawn as frozen.\n");
+ Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_FREEZETAG_SPAWN_LATE);
freezetag_Freeze(world);
}
}
}
- if(n > 1)
- centerprint(self, strcat("^5You were revived by ^7", o.netname, "^5 et al.\n"));
- else
- centerprint(self, strcat("^5You were revived by ^7", o.netname, "^5.\n"));
- centerprint(o, strcat("^5You revived ^7", self.netname, "^5.\n"));
- if(n > 1)
- bprint("^7", o.netname, "^5 et al revived ^7", self.netname, "^5.\n");
- else
- bprint("^7", o.netname, "^5 revived ^7", self.netname, "^5.\n");
+ Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_FREEZETAG_REVIVED, o.netname);
+ Send_Notification(NOTIF_ONE, o, MSG_CENTER, CENTER_FREEZETAG_REVIVE, self.netname);
+ Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVE, self.netname, o.netname);
}
// now find EVERY teammate within reviving radius, set their revive_progress values correct