Skip to content

OnPlayerDeath

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnPlayerDeath( BasePlayer instance, HitInfo info )
{
    Puts( "OnPlayerDeath works!" );
}

Location

  • BasePlayer::Die(HitInfo info)
csharp
//---
				this.Belt.DropActive(this.GetDropPosition(), this.GetInheritedDropVelocity() + vector.normalized * 3f);
				this.inventory.DropBackpackOnDeath();
			}
			if (!this.WoundInsteadOfDying(info))
			{
				if (Interface.CallHook("OnPlayerDeath", this, info) != null)
				{
					return;
				}
				SleepingBag.OnPlayerDeath(this);
				base.Die(info);
//---

Released under the MIT License.