Skip to content

OnRackedWeaponUnload

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnRackedWeaponUnload( Item slot, BasePlayer player, WeaponRack instance )
{
    Puts( "OnRackedWeaponUnload works!" );
}

Location

  • WeaponRack::UnloadWeapon(BasePlayer player, int mountSlotIndex)
csharp
//---
	Item slot = base.inventory.GetSlot(weaponAtIndex.InventoryIndex);
	if (slot == null)
	{
		return;
	}
	if (Interface.CallHook("OnRackedWeaponUnload", slot, player, this) != null)
	{
		return;
	}
	BaseEntity heldEntity = slot.GetHeldEntity();
	if (heldEntity == null)
//---

Released under the MIT License.