Traps (7)

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.

OnTrapArm

  • Called when the player arms a bear trap.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BearTrap.RPC_Arm of Assembly-CSharp.dll.

Example
object OnTrapArm(BearTrap bearTrap, BasePlayer basePlayer)
{
    Puts("OnTrapArm was called!");
    return (object) null;
}

OnTrapDisarm

  • Called when the player disarms a land mine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Landmine.RPC_Disarm of Assembly-CSharp.dll.

Example
object OnTrapDisarm(Landmine landmine, BasePlayer basePlayer)
{
    Puts("OnTrapDisarm was called!");
    return (object) null;
}

OnTrapSnapped

  • Called when a trap is triggered by a game object.

  • No return behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BaseTrapTrigger.OnObjectAdded of Assembly-CSharp.dll.

Example
void OnTrapSnapped(BaseTrapTrigger baseTrapTrigger)
{
    Puts("OnTrapSnapped was called!");
}

OnTrapTrigger (Landmine)

  • Called when a trap is triggered by a game object.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches Landmine.ObjectEntered of Assembly-CSharp.dll.

Example
object OnTrapTrigger(Landmine landmine)
{
    Puts("OnTrapTrigger was called!");
    return (object) null;
}

OnTrapTrigger (BearTrap)

  • Called when a trap is triggered by a game object.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches BearTrap.ObjectEntered of Assembly-CSharp.dll.

Example
object OnTrapTrigger(BearTrap bearTrap)
{
    Puts("OnTrapTrigger was called!");
    return (object) null;
}

OnWildlifeTrap (WildlifeTrap)

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches WildlifeTrap.TrapWildlife of Assembly-CSharp.dll.

Example
object OnWildlifeTrap(WildlifeTrap wildlifeTrap, TrappableWildlife trappableWildlife)
{
    Puts("OnWildlifeTrap was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches SurvivalFishTrap.TrapThink of Assembly-CSharp.dll.

Example
object OnWildlifeTrap(SurvivalFishTrap survivalFishTrap, ItemDefinition itemDefinition)
{
    Puts("OnWildlifeTrap was called!");
    return (object) null;
}

Last updated