Skip to content

OnTeamUpdate

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnTeamUpdate( ulong currentTeam, ulong newTeam, BasePlayer instance )
{
    Puts( "OnTeamUpdate works!" );
}

Location

  • BasePlayer::UpdateTeam(ulong newTeam)
csharp
public void UpdateTeam(ulong newTeam)
{
	if (Interface.CallHook("OnTeamUpdate", this.currentTeam, newTeam, this) != null)
	{
		return;
	}
	this.currentTeam = newTeam;
	base.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
//---

Released under the MIT License.