Skip to content

OnTeamLeave

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnTeamLeave( PlayerTeam playerTeam, BasePlayer basePlayer )
{
    Puts( "OnTeamLeave works!" );
}

Location

  • RelationshipManager::leaveteam(ConsoleSystem/Arg arg)
csharp
//---
		return;
	}
	RelationshipManager.PlayerTeam playerTeam = RelationshipManager.ServerInstance.FindTeam(basePlayer.currentTeam);
	if (playerTeam != null)
	{
		if (Interface.CallHook("OnTeamLeave", playerTeam, basePlayer) != null)
		{
			return;
		}
		playerTeam.RemovePlayer(basePlayer.userID);
		basePlayer.ClearTeam();
//---

Released under the MIT License.