Skip to content

OnBackpackDrop

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnBackpackDrop( Item anyBackpack, PlayerInventory instance )
{
    Puts( "OnBackpackDrop works!" );
}

Location

  • PlayerInventory::TryDropBackpack()
csharp
public void TryDropBackpack()
{
	Item anyBackpack = this.GetAnyBackpack();
	if (anyBackpack != null && base.baseEntity.isServer)
	{
		if (Interface.CallHook("OnBackpackDrop", anyBackpack, this) != null)
		{
			return;
		}
		anyBackpack.Drop(base.baseEntity.GetDropPosition(), base.baseEntity.GetDropVelocity(), default(Quaternion));
	}
//---

Released under the MIT License.