Skip to content

OnTeamUpdate

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

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

Location

  • BasePlayer::UpdateTeam(ulong newTeam)
csharp
public void UpdateTeam(ulong newTeam)
{
	if (Interface.CallHook("OnTeamUpdate", currentTeam, newTeam, this) == null)
	{
		currentTeam = newTeam;
		SendNetworkUpdate();
		if (RelationshipManager.ServerInstance.FindTeam(newTeam) == null)
		{
//---

Released under the MIT License.