# SetPlayerTeam

Player
5.1 OC
int
int player Player number of the player whose team assignment you want to change.
int new_team Team number of the team to be joined.
bool no_calls If `true`, calls to "RejectTeamSwitch" and "OnTeamSwitch" are not made. Also, player hostility is not automatically adjusted (this might have to be done manually instead).
Assigns a player to a new team. The player limit (MaxPlayer) of the team will be considered.
The function "RejectTeamSwitch" will be called in all game goal, rule, and environment objects. If any of these calls return `true`, then the team switch will not take place. If the team switch was performed successfully, the function "OnTeamSwitch" is called in all objects mentioned above (including the player number and new and old team numbers).
Teams
GetPlayerTeam
Clonkonaut
2008-04