GM:PlayerChangedTeam
Description
Called when a player has changed team using Player:SetTeam.
Avoid calling Player:SetTeam in this hook as it may cause an infinite loop!
Player:Team inside this hook will return
oldTeam
.Arguments
2 number oldTeam
Index of the team the player was originally in. See team.GetName and the team library.
Example
Print the old Team name and the new Team name of players.
Output: Player1 switched from Team1 to Team2