Skip to content

OnInventoryAmmoFind

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnInventoryAmmoFind( PlayerInventory instance, List<Item> list, Rust.AmmoTypes ammoType )
{
    Puts( "OnInventoryAmmoFind works!" );
    return null;
}

Location

  • PlayerInventory::FindAmmo(List<Item> list, Rust.AmmoTypes ammoType)
csharp
public void FindAmmo(List<Item> list, AmmoTypes ammoType)
{
	if (Interface.CallHook("OnInventoryAmmoFind", this, list, ammoType) == null)
	{
		containerMain?.FindAmmo(list, ammoType);
		containerBelt?.FindAmmo(list, ammoType);
	}
}

Released under the MIT License.