Class WeaponComponentCollection
Inherited Members
Namespace: GTA
Assembly: ScriptHookVDotNet3.dll
Syntax
public sealed class WeaponComponentCollection
Properties
| Improve this Doc View SourceBarrelVariationsCount
Gets the number of compatible barrel components.
Declaration
public int BarrelVariationsCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
ClipVariationsCount
Gets the number of compatible clip components.
Declaration
public int ClipVariationsCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Count
Gets the number of compatible components.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
GunRootVariationsCount
Gets the number of compatible components for GunRoot.
Declaration
public int GunRootVariationsCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Item[WeaponComponentHash]
Declaration
public WeaponComponent this[WeaponComponentHash componentHash] { get; }
Parameters
Type | Name | Description |
---|---|---|
WeaponComponentHash | componentHash |
Property Value
Type | Description |
---|---|
WeaponComponent |
Item[Int32]
Declaration
public WeaponComponent this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Property Value
Type | Description |
---|---|
WeaponComponent |
ScopeVariationsCount
Gets the number of compatible scope components.
Declaration
public int ScopeVariationsCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
SuppressorAndMuzzleBrakeVariationsCount
Gets the number of compatible suppressor and muzzle brake components.
Declaration
public int SuppressorAndMuzzleBrakeVariationsCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceGetBarrelComponent(Int32)
Gets the barrel component at the index.
Declaration
public WeaponComponent GetBarrelComponent(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The index of the barrel component subset of all the weapon component array. |
Returns
Type | Description |
---|---|
WeaponComponent | A WeaponComponent instance if the WeaponComponent at the |
GetClipComponent(Int32)
Gets the clip component at the index.
Declaration
public WeaponComponent GetClipComponent(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The index of the clip component subset of all the weapon component array. |
Returns
Type | Description |
---|---|
WeaponComponent | A WeaponComponent instance if the WeaponComponent at the |
GetEnumerator()
Declaration
public IEnumerator<WeaponComponent> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<WeaponComponent> |
GetFlashLightComponent()
Gets the flashlight component.
Declaration
public WeaponComponent GetFlashLightComponent()
Returns
Type | Description |
---|---|
WeaponComponent | The WeaponComponent instance if the flashlight component is found; otherwise, the WeaponComponent instance representing the invalid component. |
GetGunRootComponent(Int32)
Gets the component for GunRoot at the index.
Declaration
public WeaponComponent GetGunRootComponent(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The index of the components for GunRoot subset of all the weapon component array. |
Returns
Type | Description |
---|---|
WeaponComponent | A WeaponComponent instance if the WeaponComponent at the |
GetLuxuryFinishComponent()
Gets the first component of all the components for GunRoot. Despite the method name, return value is not guaranteed to a WeaponComponent instance that represents the luxury finish component.
Declaration
[Obsolete("WeaponComponentCollection.GetLuxuryFinishComponent is wrongly named and cannot necessarily get all of the components for gun_root (e.g. camo components), please use WeaponComponentCollection.GetGunRootComponent instead.")]
public WeaponComponent GetLuxuryFinishComponent()
Returns
Type | Description |
---|---|
WeaponComponent | The WeaponComponent instance if the first component of all the components for GunRoot is found; otherwise, the WeaponComponent instance representing the invalid component. |
GetScopeComponent(Int32)
Gets the scope component at the index.
Declaration
public WeaponComponent GetScopeComponent(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The index of the scope component subset of all the weapon component array. |
Returns
Type | Description |
---|---|
WeaponComponent | A WeaponComponent instance if the WeaponComponent at the |
GetSuppressorComponent()
Gets the suppressor component.
Declaration
public WeaponComponent GetSuppressorComponent()
Returns
Type | Description |
---|---|
WeaponComponent | The WeaponComponent instance if the suppressor component is found; otherwise, the WeaponComponent instance representing the invalid component. |
GetSuppressorOrMuzzleBrakeComponent(Int32)
Gets the suppressor or muzzle brake component at the index.
Declaration
public WeaponComponent GetSuppressorOrMuzzleBrakeComponent(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The index of the subset of the suppressor and muzzle brake components of all the weapon component array. |
Returns
Type | Description |
---|---|
WeaponComponent | A WeaponComponent instance if the WeaponComponent at the |