Skip to content

OnRackedWeaponLoaded

Usage

  • No return behavior

Example Autogenerated

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

Location

  • WeaponRack::LoadWeaponAmmo(BaseEntity/RPCMessage msg)
csharp
//---
	component.primaryMagazine.ammoType = itemDefinition;
	component.TryReloadMagazine(player.inventory, -1);
	this.SetSlotAmmoDetails(weaponAtIndex, slot);
	base.SendNetworkUpdateImmediate(false);
	base.ClientRPC<int, int>(RpcTarget.Player("PlayAmmoSound", player), itemDefinition.itemid, 0);
	Interface.CallHook("OnRackedWeaponLoaded", slot, itemDefinition, player, this);
}

Released under the MIT License.