def set_all_player_levels(self): '''Sets all players on the team to the highest level''' # Loop through all players on the team for userid in self.team_players: # Get the Player instance ggPlayer = Player(userid) # Does this player need to level up? if ggPlayer.level != self.level: # Level the player up to the highest level Player(userid).level = self.level # Set the player's multikill to 0 ggPlayer.multikill = 0
def set_player_level(self, userid): '''Sets a player that just joined the team's level''' # Get the player's Player() instance ggPlayer = Player(userid) # Does the player get set to level 1? if not int(gg_teamwork_jointeam_level): # Set the player to level 1 ggPlayer.level = 1 # Does the player need set to the teams start level for this round? else: # Set the player to the team's level ggPlayer.level = self.level # Either way, reset the player's multikill value ggPlayer.multikill = 0