RustTip

OnNetworkGroupLeft

OxideCarbonNetwork

Called when network group left occurs.

void OnNetworkGroupLeft(BaseNetworkable baseNetworkable, Network.Visibility.Group group)
Works — the game method in this build is the one the hook was written for.

Parameters

baseNetworkable
BaseNetworkable
group
Network.Visibility.Group

Return value

voidThe return value is ignored — the hook only notifies.

Example

private void OnNetworkGroupLeft(BaseNetworkable baseNetworkable, Network.Visibility.Group group)
{
    Puts("OnNetworkGroupLeft");
}

Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.

Injection point

Rust.opj (Oxide)
void BaseNetworkable.OnNetworkGroupLeave(Network.Visibility.Group)

Passes: BaseNetworkable baseNetworkable, Network.Visibility.Group group

WorksReturnBehavior: ContinueArgumentBehavior: AllAssembly-CSharp.dll

Where it is called (this branch's game code)

public virtual void OnNetworkGroupLeave(Group group)
{
	Interface.CallHook("OnNetworkGroupLeft", this, group);
	if (ServerOcclusion.OcclusionEnabled && SupportsServerOcclusion())
	{
		OcclusionUnsubscribedFrom(group);
	}
}

Sources: Rust.opj from OxideMod/Oxide.Rust (MIT) and hook metadata of the Carbon documentation (MIT). Method code is decompiled from this branch's server.