team.get_scoreboard_pos

This function returns a team's position on the scoreboard. A value of 1 represents 1st place, while a value of 0 results if the function is called on no_player.

This function returns number. Calling this function without storing its return value in a variable is an error.

Example

alias leader = global.team[0]

for each team do
   leader = no_team
   global.number[0] = current_team.get_scoreboard_pos()
   if global.number[0] == 1 then
      leader = current_team
   end
end

See also