Network (8)

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.

  • Called when an entity attempts to network with a player.

  • For better performance, avoid using heavy calculations in this hook.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseNetworkable.ShouldNetworkTo of Assembly-CSharp.dll.

Example
object CanNetworkTo(BaseNetworkable self)
{
    Puts("CanNetworkTo was called!");
    return (bool) null;
}
  • Called when an entity attempts to network with a player.

  • For better performance, avoid using heavy calculations in this hook.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseEntity.ShouldNetworkTo of Assembly-CSharp.dll.

Example
object CanNetworkTo(BaseEntity self)
{
    Puts("CanNetworkTo was called!");
    return (bool) null;
}
  • Called after a player has entered a network group.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseNetworkable.OnNetworkGroupEnter of Assembly-CSharp.dll.

Example
void OnNetworkGroupEntered(BaseNetworkable self)
{
    Puts("OnNetworkGroupEntered was called!");
}
  • Called after a player has left a network group.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseNetworkable.OnNetworkGroupLeave of Assembly-CSharp.dll.

Example
void OnNetworkGroupLeft(BaseNetworkable self)
{
    Puts("OnNetworkGroupLeft was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches NetworkVisibilityGrid.GetVisibleFrom of Assembly-CSharp.dll.

Example
object OnNetworkSubscriptionsGather(NetworkVisibilityGrid self)
{
    Puts("OnNetworkSubscriptionsGather was called!");
    return (object) null;
}
  • Called after the Rust has determined which network groups to subscribe a player to (`groupsToAdd`), and which network groups to unsubscribe the player from (`groupsToRemove`).

  • This hook is useful for situations where you want to subscribe a player to a network group that is outside their network range -- To do so, you can prevent Rust from automatically unsubscribing them by removing that group from the `groupsToRemove` list.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Networkable.UpdateSubscriptions of Facepunch.Network.dll.

Example
void OnNetworkSubscriptionsUpdate()
{
    Puts("OnNetworkSubscriptionsUpdate was called!");
}
  • Called after the Rust has determined which network groups to subscribe a player to (`groupsToAdd`), and which network groups to unsubscribe the player from (`groupsToRemove`).

  • This hook is useful for situations where you want to subscribe a player to a network group that is outside their network range -- To do so, you can prevent Rust from automatically unsubscribing them by removing that group from the `groupsToRemove` list.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Networkable.UpdateHighPrioritySubscriptions of Facepunch.Network.dll.

Example
void OnNetworkSubscriptionsUpdate()
{
    Puts("OnNetworkSubscriptionsUpdate was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseEntity.SignalBroadcast of Assembly-CSharp.dll.

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

Last updated