Table of Contents

Class ShotEventArgs

Namespace
Exiled.Events.EventArgs.Player
Assembly
Exiled.Events.dll

Contains all information after a player has fired a weapon.

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

Constructors

ShotEventArgs(HitscanHitregModuleBase, RaycastHit, Firearm, IDestructible)

Initializes a new instance of the ShotEventArgs class.

public ShotEventArgs(HitscanHitregModuleBase hitregModule, RaycastHit hitInfo, Firearm firearm, IDestructible destructible)

Parameters

hitregModule HitscanHitregModuleBase

Hitreg module that calculated the shot.

hitInfo RaycastHit

Raycast hit info.

firearm Firearm

The firearm used.

destructible IDestructible

The IDestructible that was hit. Can be null.

Properties

CanHurt

Gets or sets a value indicating whether the shot can deal damage.

public bool CanHurt { get; set; }

Property Value

bool

CanSpawnImpactEffects

Gets or sets a value indicating whether the shot can produce impact effects (e.g. bullet holes).

public bool CanSpawnImpactEffects { get; set; }

Property Value

bool

Damage

Gets the firearm base damage at the hit distance. Actual inflicted damage may vary.

public float Damage { get; }

Property Value

float

Destructible

Gets the IDestructible component of the hit collider. Can be null.

public IDestructible Destructible { get; }

Property Value

IDestructible

Distance

Gets the bullet travel distance.

public float Distance { get; }

Property Value

float

Firearm

Gets the firearm used to fire the shot.

public Firearm Firearm { get; }

Property Value

Firearm

Hitbox

Gets the HitboxIdentity component of the target player that was hit. Can be null.

public HitboxIdentity Hitbox { get; }

Property Value

HitboxIdentity

HitregModule

Gets the firearm hitreg module responsible for the shot.

public HitscanHitregModuleBase HitregModule { get; }

Property Value

HitscanHitregModuleBase

Item

Gets the Item triggering the event.

public Item Item { get; }

Property Value

Item

Player

Gets the player who fired the shot.

public Player Player { get; }

Property Value

Player

Position

Gets the position of the hit.

public Vector3 Position { get; }

Property Value

Vector3

RaycastHit

Gets the raycast info.

public RaycastHit RaycastHit { get; }

Property Value

RaycastHit

Target

Gets the target player. Can be null.

public Player Target { get; }

Property Value

Player