Skip to content

OnPlayerSpectateEnd

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnPlayerSpectateEnd( BasePlayer instance, string spectateFilter )
{
    Puts( "OnPlayerSpectateEnd works!" );
}

Location

  • BasePlayer::StopSpectating()
csharp
//---
{
	if (!this.IsSpectating())
	{
		return;
	}
	if (Interface.CallHook("OnPlayerSpectateEnd", this, this.spectateFilter) != null)
	{
		return;
	}
	base.SetParent(null, false, false);
	this.SetPlayerFlag(BasePlayer.PlayerFlags.Spectating, false);
//---

Released under the MIT License.