Traps (6)

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 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 self, BasePlayer player)
{
    Puts("OnTrapArm was called!");
    return (object) null;
}
  • 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 self, BasePlayer player)
{
    Puts("OnTrapDisarm was called!");
    return (object) null;
}
  • 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 BaseTrapTrigger.OnObjectAdded of Assembly-CSharp.dll.

Example
void OnTrapSnapped(BaseTrapTrigger self)
{
    Puts("OnTrapSnapped was called!");
}
  • 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 self)
{
    Puts("OnTrapTrigger was called!");
    return (object) null;
}
  • 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 self)
{
    Puts("OnTrapTrigger was called!");
    return (object) null;
}
  • 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 self, TrappableWildlife trapped)
{
    Puts("OnWildlifeTrap was called!");
    return (object) null;
}

Last updated