Garry's Mod Wiki


  GM:OnPlayerChangedTeam( Player ply, number oldTeam, number newTeam )


We advise against using this. It may be changed or removed in a future update. Use GM:PlayerChangedTeam instead, which works for every Player:SetTeam call.

Called when a player has changed team using GM:PlayerJoinTeam.

This hook will not work with hook.Add and it is only called manually from GM:PlayerJoinTeam by the base gamemode


1 Player ply
Player who has changed team
2 number oldTeam
Index of the team the player was originally in
3 number newTeam
Index of the team the player has changed to