Skip to content

OnRackedWeaponLoad

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

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

Location

  • WeaponRack::LoadWeaponAmmo(BaseEntity/RPCMessage msg)
csharp
//---
	ItemDefinition itemDefinition = ItemManager.FindItemDefinition(num);
	if (itemDefinition == null)
	{
		return;
	}
	if (Interface.CallHook("OnRackedWeaponLoad", slot, itemDefinition, player, this) != null)
	{
		return;
	}
	if (itemDefinition == SnowballGun.SnowballInventoryItem)
	{
//---

Released under the MIT License.