Skip to content

OnBoomboxToggle

Usage

  • Return a non-null value or bool to override default behavior

Example Autogenerated

csharp
private void OnBoomboxToggle( BoomBox instance, BasePlayer player, bool flag )
{
    Puts( "OnBoomboxToggle works!" );
}

Location

  • BoomBox::ServerTogglePlay(BaseEntity/RPCMessage msg)
csharp
//---
	if (!this.IsPowered())
	{
		return;
	}
	bool flag = msg.read.ReadByte() == 1;
	if (Interface.CallHook("OnBoomboxToggle", this, msg.player, flag) != null)
	{
		return;
	}
	this.ServerTogglePlay(flag);
}

Released under the MIT License.