seta hud_panel_scoreboard_spectators_showping 1 "show ping of spectators"
seta hud_panel_scoreboard_spectators_aligned 0 "align spectators in columns"
seta hud_panel_scoreboard_minwidth 0.6 "minimum width of the scoreboard"
+seta hud_panel_scoreboard_playerid 0 "show player id (server entity number) next to player's name"
+seta hud_panel_scoreboard_playerid_prefix "#" "player id prefix"
+seta hud_panel_scoreboard_playerid_suffix " " "player id suffix"
seta hud_panel_scoreboard_accuracy_showdelay 2 "how long to delay displaying accuracy below the scoreboard if it's too far down"
seta hud_panel_scoreboard_accuracy_showdelay_minpos 0.75 "delay displaying the accuracy panel only if its position is lower than this percentage of the screen height from the top"
bool autocvar_hud_panel_scoreboard_spectators_showping = true;
bool autocvar_hud_panel_scoreboard_spectators_aligned = false;
float autocvar_hud_panel_scoreboard_minwidth = 0.4;
+bool autocvar_hud_panel_scoreboard_playerid = false;
+string autocvar_hud_panel_scoreboard_playerid_prefix = "#";
+string autocvar_hud_panel_scoreboard_playerid_suffix = " ";
// mode 0: returns translated label
// mode 1: prints name and description of all the labels
sbt_field[sbt_num_fields] = SP_END;
}
+string Scoreboard_AddPlayerId(string pl_name, entity pl)
+{
+ string pref = autocvar_hud_panel_scoreboard_playerid_prefix;
+ string suf = autocvar_hud_panel_scoreboard_playerid_suffix;
+ return strcat(pref, itos(pl.sv_entnum + 1), suf, pl_name);
+}
+
// MOVEUP::
vector sbt_field_rgb;
string sbt_field_icon0;
return str;
case SP_NAME:
- return Scoreboard_GetName(pl);
+ str = Scoreboard_GetName(pl);
+ if (autocvar_hud_panel_scoreboard_playerid)
+ str = Scoreboard_AddPlayerId(str, pl);
+ return str;
case SP_FRAGS:
f = pl.(scores(SP_KILLS));
else if(autocvar_hud_panel_scoreboard_others_showscore)
field = Scoreboard_GetField(pl, SP_SCORE);
- string str = textShortenToWidth(entcs_GetName(pl.sv_entnum), namesize, hud_fontsize, stringwidth_colors);
+ string str = entcs_GetName(pl.sv_entnum);
+ if (autocvar_hud_panel_scoreboard_playerid)
+ str = Scoreboard_AddPlayerId(str, pl);
+ str = textShortenToWidth(str, namesize, hud_fontsize, stringwidth_colors);
float column_width = stringwidth(str, true, hud_fontsize);
if((this_team == NUM_SPECTATOR) && autocvar_hud_panel_scoreboard_spectators_aligned)
{