Skip to content

OnAmmoUnload

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnAmmoUnload( BaseProjectile component, Item item, BasePlayer player )
{
    Puts( "OnAmmoUnload works!" );
    return null;
}

Location

  • BaseProjectile::UnloadAmmo(Item item, BasePlayer player)
csharp
public void UnloadAmmo(Item item, BasePlayer player)
{
	BaseProjectile component = item.GetHeldEntity().GetComponent<BaseProjectile>();
	if (!component.canUnloadAmmo || Interface.CallHook("OnAmmoUnload", component, item, player) != null || !component)
	{
		return;
	}
	int num = component.primaryMagazine.contents;
	if (num <= 0)
//---

Released under the MIT License.