Skip to content

OnTrapArm

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnTrapArm( BearTrap instance, BasePlayer player )
{
    Puts( "OnTrapArm works!" );
    return null;
}

Location

  • BearTrap::RPC_Arm(BaseEntity.RPCMessage rpc)
csharp
[RPC_Server.MaxDistance(3f)]
[RPC_Server]
private void RPC_Arm(RPCMessage rpc)
{
	if (!Armed() && Interface.CallHook("OnTrapArm", this, rpc.player) == null)
	{
		Arm();
	}
}

Released under the MIT License.