Skip to content

OnButtonPress

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnButtonPress( PressButton instance, BasePlayer player )
{
    Puts( "OnButtonPress works!" );
}

Location

  • PressButton::RPC_Press(BaseEntity/RPCMessage msg)
csharp
[BaseEntity.RPC_Server, BaseEntity.RPC_Server.IsVisible(3f)]
public void RPC_Press(BaseEntity.RPCMessage msg)
{
	if (Interface.CallHook("OnButtonPress", this, msg.player) != null)
	{
		return;
	}
	this.Press();
}

Released under the MIT License.