db_put(PS_GR_OUT_DB, sprintf("%s:_playerid", p.playerstats_id), ftos(p.playerid));
if(p.cvar_cl_allow_uid2name == 1 || IS_BOT_CLIENT(p))
- db_put(PS_GR_OUT_DB, sprintf("%s:_netname", p.playerstats_id), p.netname);
+ db_put(PS_GR_OUT_DB, sprintf("%s:_netname", p.playerstats_id), playername(p, false));
if(teamplay)
db_put(PS_GR_OUT_DB, sprintf("%s:_team", p.playerstats_id), ftos(p.team));
// if we get here, player is not allowed to cheat. Log it.
if(i)
- bprintf("Player %s^7 tried to use cheat 'impulse %d'\n", this.netname, i);
+ bprintf("Player %s^7 tried to use cheat 'impulse %d'\n", playername(this, false), i);
else if(argc)
- bprintf("Player %s^7 tried to use cheat '%s'\n", this.netname, argv(0));
+ bprintf("Player %s^7 tried to use cheat '%s'\n", playername(this, false), argv(0));
else if(fr)
- bprintf("Player %s^7 tried to use cheat frame %d\n", this.netname, fr);
+ bprintf("Player %s^7 tried to use cheat frame %d\n", playername(this, false), fr);
else
- bprintf("Player %s^7 tried to use an unknown cheat\n", this.netname);
+ bprintf("Player %s^7 tried to use an unknown cheat\n", playername(this, false));
return 0;
}
if (caller.ready) // toggle
{
caller.ready = false;
- bprint(caller.netname, "^2 is ^1NOT^2 ready\n");
+ bprint(playername(caller, false), "^2 is ^1NOT^2 ready\n");
}
else
{
caller.ready = true;
- bprint(caller.netname, "^2 is ready\n");
+ bprint(playername(caller, false), "^2 is ready\n");
}
// cannot reset the game while a timeout is active!
sprint(client, strcat("\{1}\{13}^3", admin_name(), "^7: ", admin_message, "\n"));
}
- successful = strcat(successful, (successful ? ", " : ""), client.netname);
- LOG_TRACE("Message sent to ", client.netname);
+ successful = strcat(successful, (successful ? ", " : ""), playername(client, false));
+ LOG_TRACE("Message sent to ", playername(client, false));
continue;
}
if (accepted > 0)
{
stuffcmd(client, "defer clear\n");
- LOG_INFO("defer clear stuffed to ", client.netname, "\n");
+ LOG_INFO("defer clear stuffed to ", playername(client, false), "\n");
}
else { LOG_INFO("defer_clear: ", GetClientErrorString(accepted, argv(1)), ".\n"); }
if (client.caplayer) client.caplayer = 0;
PutObserverInServer(client);
- successful = strcat(successful, (successful ? ", " : ""), client.netname);
+ successful = strcat(successful, (successful ? ", " : ""), playername(client, false));
}
else
{
- LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already spectating.\n");
+ LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") is already spectating.\n");
}
continue;
}
if (team_id == client.team) // already on the destination team
{
// keep the forcing undone
- LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already on the ", Team_ColoredFullName(client.team), (targets ? "^7, skipping to next player.\n" : "^7.\n"));
+ LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") is already on the ", Team_ColoredFullName(client.team), (targets ? "^7, skipping to next player.\n" : "^7.\n"));
continue;
}
else if (team_id == 0) // auto team
// If so, lets continue and finally move the player
client.team_forced = 0;
MoveToTeam(client, team_id, 6);
- successful = strcat(successful, (successful ? ", " : ""), client.netname);
- LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") has been moved to the ", Team_ColoredFullName(team_id), "^7.\n");
+ successful = strcat(successful, (successful ? ", " : ""), playername(client, false));
+ LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") has been moved to the ", Team_ColoredFullName(team_id), "^7.\n");
continue;
}
else
privatemsgprefixlen = strlen(msgstr);
msgstr = strcat(msgstr, msgin);
cmsgstr = strcat(colorstr, colorprefix, namestr, "^3 tells you:\n^7", msgin);
- if(autocvar_g_chat_teamcolors)
- privatemsgprefix = strcat("\{1}\{13}* ^3You tell ", playername(privatesay, true), ": ^7");
- else
- privatemsgprefix = strcat("\{1}\{13}* ^3You tell ", privatesay.netname, ": ^7");
+ privatemsgprefix = strcat("\{1}\{13}* ^3You tell ", playername(privatesay, autocvar_g_chat_teamcolors), ": ^7");
}
else if(teamsay)
{
sk = p.scorekeeper;
- s = strcat(s, p.netname);
+ s = strcat(s, playername(p, false));
for (;;)
{
i = strlennocol(s) - NAMEWIDTH;
void Score_NicePrint_Spectator(entity to, entity p)
{
- print_to(to, strcat(" ", p.netname));
+ print_to(to, strcat(" ", playername(p, false)));
}
.float score_dummyfield;
LogTeamchange(pl.playerid, pl.team, 3); // log manual team join
if(!noprint)
- bprint(pl.netname, "^7 has changed from ", Team_NumberToColoredFullName(s), "^7 to ", Team_NumberToColoredFullName(t), "\n");
+ bprint(playername(pl, false), "^7 has changed from ", Team_NumberToColoredFullName(s), "^7 to ", Team_NumberToColoredFullName(t), "\n");
}
}
if(autocvar_g_hitplots || strhasword(autocvar_g_hitplots_individuals, player.netaddress))
{
player.hitplotfh = fopen(strcat("hits-", matchid, "-", player.netaddress, "-", ftos(player.playerid), ".plot"), FILE_WRITE);
- fputs(player.hitplotfh, strcat("#name ", player.netname, "\n"));
+ fputs(player.hitplotfh, strcat("#name ", playername(player, false), "\n"));
}
else { player.hitplotfh = -1; }
}