Skip to content

OnSamSiteModeToggle

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

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

Location

  • SamSite::ToggleDefenderMode(BaseEntity/RPCMessage msg)
csharp
//---
	bool flag = msg.read.Bit();
	if (flag == this.IsInDefenderMode())
	{
		return;
	}
	if (Interface.CallHook("OnSamSiteModeToggle", this, player, flag) != null)
	{
		return;
	}
	base.SetFlag(this.Flag_ManuallySetMode, flag, false, true);
	base.SetFlag(this.Flag_TargetMode, flag, false, true);
//---

Released under the MIT License.