43 #define PlayerScore_Get(player, scorefield) PlayerScore_Add(player, scorefield, 0) 117 #define WINNINGCONDITIONHELPER_LOWERISBETTER_WORST 999999999 void ScoreInfo_Init(float teams)
Initialize the scores info for the given number of teams.
bool autocvar_g_full_getstatus_responses
void WinningConditionHelper(entity this)
Sets the following results for the current scores entities.
float WinningConditionHelper_secondteam
the color of the second team, or -1 if none
entity PlayerScore_Sort(.float field, int teams, bool strict, bool nospectators)
Sorts the players and stores their place in the given field, starting with.
float WinningConditionHelper_lowerisbetter
lower is better, duh
void PlayerScore_Attach(entity player)
Attaches a PlayerScore entity to a player.
float PlayerScore_Add(entity player, PlayerScoreField scorefield, float score)
Adds a score to the player's scores.
string GetTeamScoreString(float tm, float shortString)
float PlayerTeamScore_Add(entity player, PlayerScoreField pscorefield, float tscorefield, float score)
Adds a score to both the player and the team.
void ScoreInfo_SetLabel_TeamScore(float i, string label, float scoreflags)
Set the label of a team score item, as well as the scoring flags.
entity WinningConditionHelper_winner
the winning player, or NULL if none
string GetPlayerScoreString(entity pl, float shortString)
Returns score strings for eventlog etc.
float WinningConditionHelper_zeroisworst
zero is worst, duh
entity scores_initialized
float WinningConditionHelper_secondscore
second highest score
void PlayerScore_Detach(entity player)
Detaches a PlayerScore entity from the player.
void Score_NicePrint(entity to)
Prints the scores to the console of a player.
entity WinningConditionHelper_second
the second player, or NULL if none
float TeamScore_Add(entity player, float scorefield, float score)
Adds a score to the player's team's scores.
void Score_ClearAll()
Clear ALL scores (for ready-restart).
float PlayerScore_Clear(entity player)
Initialize the score of this player if needed.
float TeamScore_AddToTeam(int t, float scorefield, float score)
Adds a score to the given team.
void ScoreInfo_SetLabel_PlayerScore(PlayerScoreField i, string label, float scoreflags)
Set the label of a player score item, as well as the scoring flags.
float WinningConditionHelper_winnerteam
the color of the winning team, or -1 if none
float TeamScore_GetCompareValue(float t)
Returns a value indicating the team score (and higher is better).
float PlayerScore_Set(entity player, PlayerScoreField scorefield, float score)
Sets the player's score to the score parameter.
float WinningConditionHelper_topscore
highest score
float WinningConditionHelper_equality
we have no winner