ped weapon

### Hierarchy

- Weapon

## Index

### Constructors

- constructor

### Properties

- components
- hash
- owner

### Accessors

- Ammo
- AmmoType
- CanUseOnParachute
- Components
- DefaultClipSize
- DisplayName
- Group
- Hash
- HudStats
- InfiniteAmmo
- InfiniteAmmoClip
- IsMk2
- IsPresent
- IsUnarmed
- LocalizedName
- MaxAmmo
- MaxAmmoInClip
- Model
- Tint

### Methods

- setLivery
- getDisplayNameFromHash
- getWeaponComponentHashes

## Constructors

### constructor

- new Weapon(owner: Ped, hash: WeaponHash): Weapon

- - Defined in weapon/Weapon.ts:26

  #### Parameters

  - ##### owner: Ped

  - ##### hash: WeaponHash

  #### Returns Weapon

## Properties

### Private Readonly components

components: WeaponComponentCollection

- Defined in weapon/Weapon.ts:23

### Private Readonly hash

hash: WeaponHash

- Defined in weapon/Weapon.ts:24

### Private Readonly owner

owner: Ped

- Defined in weapon/Weapon.ts:22

## Accessors

### Ammo

- get Ammo(): number
- set Ammo(count: number): void

- - Defined in weapon/Weapon.ts:141

  get weapon ammo count

  #### Returns number

- - Defined in weapon/Weapon.ts:159

  set weapon ammo count

  #### Parameters

  - ##### count: number

  #### Returns void

### AmmoType

- get AmmoType(): AmmoType

- - Defined in weapon/Weapon.ts:132

  get weapon ammo type

  #### Returns AmmoType

### CanUseOnParachute

- get CanUseOnParachute(): boolean

- - Defined in weapon/Weapon.ts:250

  check weapon can use on parachute

  #### Returns boolean

### Components

- get Components(): WeaponComponentCollection

- - Defined in weapon/Weapon.ts:37

  weapon components

  #### Returns WeaponComponentCollection

### DefaultClipSize

- get DefaultClipSize(): number

- - Defined in weapon/Weapon.ts:217

  get weapon default clip size

  #### Returns number

### DisplayName

- get DisplayName(): string

- - Defined in weapon/Weapon.ts:77

  get weapon display name / label

  #### Returns string

### Group

- get Group(): WeaponGroup

- - Defined in weapon/Weapon.ts:123

  get weapon group

  #### Returns WeaponGroup

### Hash

- get Hash(): WeaponHash

- - Defined in weapon/Weapon.ts:46

  weapon hash

  #### Returns WeaponHash

### HudStats

- get HudStats(): undefined | WeaponHudStats

- - Defined in weapon/Weapon.ts:291

  get weapon hud stats

  #### Returns undefined | WeaponHudStats

### InfiniteAmmo

- set InfiniteAmmo(toggle: boolean): void

- - Defined in weapon/Weapon.ts:227

  toggle weapon infinite ammo

  #### Parameters

  - ##### toggle: boolean

  #### Returns void

### InfiniteAmmoClip

- set InfiniteAmmoClip(toggle: boolean): void

- - Defined in weapon/Weapon.ts:241

  toggle ped infinite ammo clip on all weapons

  #### Parameters

  - ##### toggle: boolean

  #### Returns void

### IsMk2

- get IsMk2(): boolean

- - Defined in weapon/Weapon.ts:259

  Check weapon is Mk2 or not

  #### Returns boolean

### IsPresent

- get IsPresent(): boolean

- - Defined in weapon/Weapon.ts:64

  Check ped owns weapon

  #### Returns boolean

### IsUnarmed

- get IsUnarmed(): boolean

- - Defined in weapon/Weapon.ts:55

  check ped is unarmed or not

  #### Returns boolean

### LocalizedName

- get LocalizedName(): string

- - Defined in weapon/Weapon.ts:86

  get weapon localized name

  #### Returns string

### MaxAmmo

- get MaxAmmo(): number

- - Defined in weapon/Weapon.ts:176

  get weapon max ammo

  #### Returns number

### MaxAmmoInClip

- get MaxAmmoInClip(): number

- - Defined in weapon/Weapon.ts:200

  get weapon max ammo in clip

  #### Returns number

### Model

- get Model(): Model

- - Defined in weapon/Weapon.ts:95

  get weapon model

  #### Returns Model

### Tint

- get Tint(): WeaponTint
- set Tint(tint: WeaponTint): void

- - Defined in weapon/Weapon.ts:104

  get weapon tint

  #### Returns WeaponTint

- - Defined in weapon/Weapon.ts:114

  set weapon tint

  #### Parameters

  - ##### tint: WeaponTint

  #### Returns void

## Methods

### setLivery

- setLivery(liveryId: WeaponLivery, colorId: WeaponLiveryColor): void

- - Defined in weapon/Weapon.ts:269

  set weapon livery, only work for Mk2 weapon

  #### Parameters

  - ##### liveryId: WeaponLivery

  - ##### colorId: WeaponLiveryColor

  #### Returns void

### Static getDisplayNameFromHash

- getDisplayNameFromHash(hash: WeaponHash): string

- - Defined in weapon/Weapon.ts:300

  get weapon display name / label by hash

  #### Parameters

  - ##### hash: WeaponHash

  #### Returns string

### Static getWeaponComponentHashes

- getWeaponComponentHashes(hash: WeaponHash): WeaponComponentHash[]

- - Defined in weapon/Weapon.ts:313

  get component hashes belongs to weapon

  #### Parameters

  - ##### hash: WeaponHash

  #### Returns WeaponComponentHash[]

Generated using TypeDoc