Table of Contents

Class ChangingAmmoEventArgs

Namespace
Exiled.Events.EventArgs.Item
Assembly
Exiled.Events.dll

Contains all information before changing firearm ammo.

public class ChangingAmmoEventArgs : IFirearmEvent, IItemEvent, IPlayerEvent, IDeniableEvent, IExiledEvent
Inheritance
ChangingAmmoEventArgs
Implements
Inherited Members
Extension Methods

Constructors

ChangingAmmoEventArgs(ItemBase, byte, byte, bool)

Initializes a new instance of the ChangingAmmoEventArgs class.

public ChangingAmmoEventArgs(ItemBase firearm, byte oldAmmo, byte newAmmo, bool isAllowed = true)

Parameters

firearm ItemBase
oldAmmo byte
newAmmo byte
isAllowed bool

Properties

Firearm

Gets the Firearm the ammo type is being changed to.

public Firearm Firearm { get; }

Property Value

Firearm

IsAllowed

Gets or sets a value indicating whether the ammo can be changed.

public bool IsAllowed { get; set; }

Property Value

bool

Item

Gets the Item triggering the event.

public Item Item { get; }

Property Value

Item

NewAmmo

Gets or sets the new ammo to be used by the firearm.

public byte NewAmmo { get; set; }

Property Value

byte

OldAmmo

Gets the old ammo.

public byte OldAmmo { get; }

Property Value

byte

Player

Gets the Player who's changing the Firearm's ammo.

public Player Player { get; }

Property Value

Player