Skip to content

OnTurretModeToggle

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

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

Location

  • AutoTurret::SERVER_AttackAll(BaseEntity/RPCMessage rpc)
  • AutoTurret::SERVER_Peacekeeper(BaseEntity/RPCMessage rpc)
csharp
[BaseEntity.RPC_Server, BaseEntity.RPC_Server.IsVisible(3f)]
private void SERVER_AttackAll(BaseEntity.RPCMessage rpc)
{
	if (this.IsAuthed(rpc.player))
	{
		if (Interface.CallHook("OnTurretModeToggle", this, rpc.player) != null)
		{
			return;
		}
		this.SetPeacekeepermode(false);
	}
//---
csharp
[BaseEntity.RPC_Server, BaseEntity.RPC_Server.IsVisible(3f)]
private void SERVER_Peacekeeper(BaseEntity.RPCMessage rpc)
{
	if (this.IsAuthed(rpc.player))
	{
		if (Interface.CallHook("OnTurretModeToggle", this, rpc.player) != null)
		{
			return;
		}
		this.SetPeacekeepermode(true);
	}
//---

Released under the MIT License.