Table of Contents

Class ReceivingGunSoundEventArgs

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

Contains all information before a player receive gun sound.

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

Constructors

ReceivingGunSoundEventArgs(ReferenceHub, Firearm, int, MixerChannel, float, float, Vector3, bool)

Initializes a new instance of the ReceivingGunSoundEventArgs class.

public ReceivingGunSoundEventArgs(ReferenceHub hub, Firearm firearm, int audioIndex, MixerChannel mixerChannel, float range, float pitch, Vector3 ownPos, bool isSenderVisible)

Parameters

hub ReferenceHub

The referencehub who will receive gun sound.

firearm Firearm

The internal firearm instance.

audioIndex int

The index of the audio clip to be played.

mixerChannel MixerChannel

The audio mixer channel.

range float

The audible range of the sound.

pitch float

The pitch of the sound.

ownPos Vector3

The audio owner position.

isSenderVisible bool

The audio owner is visible for this player.

Properties

AudioIndex

Gets or sets the index of the audio clip to be played from the firearm's audio list.

public int AudioIndex { get; set; }

Property Value

int

Firearm

Gets the firearm that was the source of the sound.

public Firearm Firearm { get; }

Property Value

Firearm

IsAllowed

Gets or sets a value indicating whether the gun sound should be sent.

public bool IsAllowed { get; set; }

Property Value

bool

Item

Gets the Item triggering the event.

public Item Item { get; }

Property Value

Item

MixerChannel

Gets or sets the mixer channel through which the sound will be played.

public MixerChannel MixerChannel { get; set; }

Property Value

MixerChannel

Pitch

Gets or sets the pitch of the gun sound.

public float Pitch { get; set; }

Property Value

float

Player

Gets the player who will receive gun sound.

public Player Player { get; }

Property Value

Player

Range

Gets or sets the max audible distance of the gun sound.

public float Range { get; set; }

Property Value

float

Sender

Gets the player who owns the Firearm.

public Player Sender { get; }

Property Value

Player

SenderPosition

Gets or sets the virtual origin point used(Only works when SenderVisible is false).

public Vector3 SenderPosition { get; set; }

Property Value

Vector3

SenderVisible

Gets a value indicating whether Sender is visible for this player.

public bool SenderVisible { get; }

Property Value

bool