Skip to content

OnHotAirBalloonToggled

Usage

  • No return behavior

Example Autogenerated

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

Location

  • HotAirBalloon::EngineSwitch(BaseEntity/RPCMessage msg)
  • HotAirBalloon::EngineSwitch(BaseEntity/RPCMessage msg)
csharp
//---
	bool b = msg.read.Bit();
	base.SetFlag(BaseEntity.Flags.On, b, false, true);
	if (base.IsOn())
	{
		base.Invoke(new Action(this.ScheduleOff), 60f);
		Interface.CallHook("OnHotAirBalloonToggled", this, msg.player);
		return;
	}
	base.CancelInvoke(new Action(this.ScheduleOff));
}
csharp
//---
	bool b = msg.read.Bit();
	base.SetFlag(BaseEntity.Flags.On, b, false, true);
	if (base.IsOn())
	{
		base.Invoke(new Action(this.ScheduleOff), 60f);
		Interface.CallHook("OnHotAirBalloonToggled", this, msg.player);
		return;
	}
	base.CancelInvoke(new Action(this.ScheduleOff));
	Interface.CallHook("OnHotAirBalloonToggled", this, msg.player);
}

Released under the MIT License.