1 float numteams; // NOTE: This is changed in Sbar_SortFrags, so use it only AFTER that
5 float TeamByColor(float color)
9 case COLOR_TEAM1: return 0;
10 case COLOR_TEAM2: return 1;
11 case COLOR_TEAM3: return 2;
12 case COLOR_TEAM4: return 3;
17 float GetPlayerColorForce(float i)
22 return stof(getplayerkey(i, "colors")) & 15;
25 float GetPlayerColor(float i)
27 if not(playerslots[i].gotscores) // unconnected
28 return COLOR_SPECTATOR;
29 else if(stof(getplayerkey(i, "frags")) == FRAGS_SPECTATOR)
30 return COLOR_SPECTATOR;
32 return GetPlayerColorForce(i);
35 string GetPlayerName(float i)
37 return ColorTranslateRGB(getplayerkey(i, "name"));
40 vector GetTeamRGB(float color)
44 default: return '1 1 1';
45 case COLOR_TEAM1: return '1 0 0'; // red
46 case COLOR_TEAM2: return '0 0 1'; // blue
47 case COLOR_TEAM3: return '1 1 0'; // yellow
48 case COLOR_TEAM4: return '1 0 1'; // pink
52 string GetTeamName(float color)
56 default: return "Spectators";
57 case COLOR_TEAM1: return "Red Team";
58 case COLOR_TEAM2: return "Blue Team";
59 case COLOR_TEAM3: return "Yellow Team";
60 case COLOR_TEAM4: return "Pink Team";