Table of Contents

Class ShootingEventArgs

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

Contains all information before a player fires a weapon. ClaimedTarget and Player transform values are modified by PlayerRoles.FirstPersonControl.FpcBacktracker according to ShotBacktrackData sent by the Player and do not match the actual values.

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

Constructors

ShootingEventArgs(Firearm, ref ShotBacktrackData)

Initializes a new instance of the ShootingEventArgs class.

public ShootingEventArgs(Firearm firearm, ref ShotBacktrackData shotBacktrackData)

Parameters

firearm Firearm

The InventorySystem.Items.Firearms.Firearm that is being fired.

shotBacktrackData ShotBacktrackData

ShotBacktrackData sent by the client.

Properties

ClaimedTarget

Gets the target that client claims it hit.

public Player ClaimedTarget { get; }

Property Value

Player

Remarks

This value is controlled by the shooting player and should not be trusted. Can be null.

Direction

Gets or sets the exact direction of the shot before the bullet spread is applied.

public Vector3 Direction { get; set; }

Property Value

Vector3

Firearm

Gets the firearm that is being fired.

public Firearm Firearm { get; }

Property Value

Firearm

IsAllowed

Gets or sets a value indicating whether the shot can be fired.

public bool IsAllowed { get; set; }

Property Value

bool

Item

Gets the Item triggering the event.

public Item Item { get; }

Property Value

Item

Player

Gets the player who is shooting.

public Player Player { get; }

Property Value

Player

ShotBacktrackData

Gets the ShotBacktrackData. This object contains the data sent by the client to the server.

public ShotBacktrackData ShotBacktrackData { get; }

Property Value

ShotBacktrackData

Remarks

Values are controlled by the shooting player and should not be trusted.