Skip to content

OnBackpackDrop

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

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

Location

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

Released under the MIT License.