team.has_any_players
This function checks whether a team has any players on it. Players that have left the match will not count.
Example
-- From CTF: delete a team's flag if all of their players quit and their flag is -- at home. alias state = object.number[0] alias flag = team.object[1] for each team do alias current_flag = global.object[0] if current_team != neutral_team and not current_team.has_any_players() and current_team.flag != no_object then current_flag = current_team.flag if current_flag.state == 0 then current_team.flag.delete() current_team.flag = no_object end end end