Team (12)

All currently available hooks that are found in Carbon. Most hooks would be ones compatible with Oxide, although there are Carbon-only ones as well.

OnTeamAcceptInvite

  • Useful for canceling team invitation acceptation.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RelationshipManager.acceptinvite of Assembly-CSharp.dll.

Example
object OnTeamAcceptInvite(RelationshipManager.PlayerTeam PlayerTeam , BasePlayer BasePlayer )
{
    Puts("OnTeamAcceptInvite was called!");
    return (object) null;
}

OnTeamCreate

  • Useful for canceling team creation.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RelationshipManager.trycreateteam of Assembly-CSharp.dll.

Example
object OnTeamCreate(BasePlayer BasePlayer )
{
    Puts("OnTeamCreate was called!");
    return (object) null;
}

OnTeamCreated

  • Called after a team was created.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RelationshipManager.trycreateteam of Assembly-CSharp.dll.

Example
void OnTeamCreated(BasePlayer BasePlayer )
{
    Puts("OnTeamCreated was called!");
}

This hook requires OnTeamCreate, which loads alongside OnTeamCreated.

OnTeamDisband

  • Useful for canceling team disbandment.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RelationshipManager.DisbandTeam of Assembly-CSharp.dll.

Example
object OnTeamDisband()
{
    Puts("OnTeamDisband was called!");
    return (object) null;
}

OnTeamDisbanded

  • Called when the team was disbanded.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RelationshipManager.DisbandTeam of Assembly-CSharp.dll.

Example
void OnTeamDisbanded()
{
    Puts("OnTeamDisbanded was called!");
}

This hook requires OnTeamDisband, which loads alongside OnTeamDisbanded.

OnTeamInvite

  • Useful for canceling an invitation.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RelationshipManager.sendinvite of Assembly-CSharp.dll.

Example
object OnTeamInvite(BasePlayer BasePlayer , BasePlayer BasePlayer )
{
    Puts("OnTeamInvite was called!");
    return (object) null;
}

OnTeamKick

  • Useful for canceling kick of the player from the team.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RelationshipManager.kickmember of Assembly-CSharp.dll.

Example
object OnTeamKick(RelationshipManager.PlayerTeam PlayerTeam , BasePlayer BasePlayer , ulong UInt64 )
{
    Puts("OnTeamKick was called!");
    return (object) null;
}

OnTeamLeave

  • Useful for canceling the leave from the team.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RelationshipManager.leaveteam of Assembly-CSharp.dll.

Example
object OnTeamLeave(RelationshipManager.PlayerTeam PlayerTeam , BasePlayer BasePlayer )
{
    Puts("OnTeamLeave was called!");
    return (object) null;
}

OnTeamPromote

  • Useful for canceling player's promotion in the team.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RelationshipManager.promote of Assembly-CSharp.dll.

Example
object OnTeamPromote(RelationshipManager.PlayerTeam PlayerTeam , BasePlayer BasePlayer )
{
    Puts("OnTeamPromote was called!");
    return (object) null;
}
  • Useful for canceling the invitation rejection.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches RelationshipManager.rejectinvite of Assembly-CSharp.dll.

Example
object OnTeamRejectInvite(BasePlayer BasePlayer , RelationshipManager.PlayerTeam PlayerTeam )
{
    Puts("OnTeamRejectInvite was called!");
    return (object) null;
}

OnTeamUpdate

  • Called when player's team is updated.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BasePlayer.UpdateTeam of Assembly-CSharp.dll.

Example
object OnTeamUpdate(BasePlayer BasePlayer , ulong UInt64 , BasePlayer BasePlayer )
{
    Puts("OnTeamUpdate was called!");
    return (object) null;
}
  • Called before sending team info to player.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BasePlayer.TeamUpdate of Assembly-CSharp.dll.

Example
object OnTeamUpdated(BasePlayer BasePlayer , ProtoBuf.PlayerTeam PlayerTeam , BasePlayer BasePlayer )
{
    Puts("OnTeamUpdated was called!");
    return (object) null;
}

Last updated