Page 1 of 1

player.switch_team() second argument

Posted: Tue Nov 17, 2015 1:05 pm
by iPlayer
Hi there again
So the first argument is the team to move a player to, the third one (boolean) is whether the message should not be printed to chat, but what does the second one stand for?

Posted: Tue Nov 17, 2015 1:58 pm
by Ayuto
Actually, player.switch_team() only requires one argument, which is the team number.

Posted: Tue Nov 17, 2015 2:57 pm
by satoon101
I think you probably got that information from an old thread. We used to use CBasePlayer::ChangeTeam, but that virtual function had its issues. We have since moved to CCSPlayer::SwitchTeam which only has one argument, the team to change to. If you want to hide the chat message when using this, you will need to use a PreEvent for player_team and return EventAction.STOP_BROADCAST.

Posted: Tue Nov 17, 2015 3:07 pm
by iPlayer
Thanks, guys.
Indeed, I got that info from this post.