RustTip

OnContainerDropItems

OxideCarbonEntity

Called when container drop items occurs.

object OnContainerDropItems(ItemContainer container)
Method missing — this game build has no method the hook is injected into: until it is updated, the hook is not called.

Parameters

container
ItemContainer

Return value

objectReturn non-null to cancel the game action.

Example

object — you can affect the game: return a value to change or cancel the action.

private object OnContainerDropItems(ItemContainer container)
{
    Puts("OnContainerDropItems");

    // change nothing — the game continues as usual
    return null;

    // to affect the game:
    // return false; // non-null cancels the game action
}

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

Injection point

Rust.opj (Oxide)
void DropUtil.DropItems(ItemContainer, Vector3)
Method missingReturnBehavior: ExitWhenValidTypeArgumentBehavior: UseArgumentString (a0)Assembly-CSharp.dll

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.