Skip to content

OnPlayerSleep

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnPlayerSleep( BasePlayer instance )
{
    Puts( "OnPlayerSleep works!" );
}

Location

  • BasePlayer::StartSleeping()
csharp
//---
{
	if (this.IsSleeping())
	{
		return;
	}
	Interface.CallHook("OnPlayerSleep", this);
	if (this.IsRestrained)
	{
		this.inventory.SetLockedByRestraint(false);
	}
	if (this.InSafeZone() && !base.IsInvoking(new Action(this.ScheduledDeath)))
//---

Released under the MIT License.