Skip to content

OnRackedWeaponUnloaded

Usage

  • No return behavior

Example Autogenerated

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

Location

  • WeaponRack::UnloadWeapon(BasePlayer player, int mountSlotIndex)
csharp
//---
	ItemDefinition ammoType = component.primaryMagazine.ammoType;
	component.UnloadAmmo(slot, player);
	this.SetSlotAmmoDetails(weaponAtIndex, slot);
	base.SendNetworkUpdateImmediate(false);
	base.ClientRPC<int, int>(RpcTarget.Player("PlayAmmoSound", player), ammoType.itemid, 1);
	Interface.CallHook("OnRackedWeaponUnloaded", slot, player, this);
}

Released under the MIT License.