Revision Difference
GM:PlayerChangedTeam#525275
<function name="PlayerChangedTeam" parent="GM" type="hook">
<ishook>yes</ishook>
<added>2020.02.28</added>⤶
<added>2020.03.17</added>⤶
<description>
<note>next update</note>⤶
Called when a player has changed team using <page>Player:SetTeam</page>.
<warning>Avoid calling <page>Player:SetTeam</page> in this hook as it may cause an infinite loop!</warning>
</description>
<realm>Server</realm>
<predicted>No</predicted>
<args>
<arg name="ply" type="Player">Player whose team has changed</arg>
<arg name="oldTeam" type="number">Index of the team the player was originally in. See <page>team.GetName</page> and the <page>team</page> library.</arg>
<arg name="newTeam" type="number">Index of the team the player has changed to</arg>
</args>
</function>