OnRackedWeaponUnload
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private object OnRackedWeaponUnload( Item slot, BasePlayer player, WeaponRack instance )
{
Puts( "OnRackedWeaponUnload works!" );
return null;
}Location
- WeaponRack::UnloadWeapon(BasePlayer player, int mountSlotIndex)
csharp
//---
if (weaponAtIndex == null || !weaponAtIndex.CanBeReloadedAtWeaponRack())
{
return;
}
Item slot = base.inventory.GetSlot(weaponAtIndex.InventoryIndex);
if (slot == null || Interface.CallHook("OnRackedWeaponUnload", slot, player, this) != null)
{
return;
}
BaseEntity heldEntity = slot.GetHeldEntity();
if (!(heldEntity == null))
//---