Class WeaponObject
Inherited Members
LocalObject.setMeta
LocalObject.deleteMeta
LocalObject.getMeta
LocalObject.hasMeta
LocalObject.getSyncedMeta
LocalObject.hasSyncedMeta
LocalObject.getStreamSyncedMeta
LocalObject.hasStreamSyncedMeta
LocalObject.type
LocalObject.valid
LocalObject.id
LocalObject.destroy
LocalObject.getMetaDataKeys
LocalObject.refCount
Module: alt-client
Package: @altmp/altv-types
Syntax
class WeaponObject extends LocalObject
Constructors
| Improve this Doc View SourceWeaponObject(string | number, Vector3, Vector3, string | number, number, boolean, number, boolean, number)
Declaration
WeaponObject(weaponHash: string | number, pos: Vector3, rot: Vector3, modelHash?: string | number, numAmmo?: number, createDefaultComponents?: boolean, scale?: number, useStreaming?: boolean, streamingDistance?: number): WeaponObject
Parameters
Type | Name | Description |
---|---|---|
string | number | weaponHash | |
Vector3 | pos | |
Vector3 | rot | |
string | number | modelHash | |
number | numAmmo | |
boolean | createDefaultComponents | |
number | scale | |
boolean | useStreaming | |
number | streamingDistance |
Properties
| Improve this Doc View Sourceall
Declaration
public readonly static all: readonly WeaponObject[]
Property Value
Type | Description |
---|---|
readonly WeaponObject[] |
count
Declaration
public readonly static count: number
Property Value
Type | Description |
---|---|
number |
isWeaponObject
Declaration
public readonly isWeaponObject: boolean
Property Value
Type | Description |
---|---|
boolean |
tintIndex
Declaration
public tintIndex: number
Property Value
Type | Description |
---|---|
number |
Methods
| Improve this Doc View SourcesetComponentTintIndex(number, number)
Declaration
public setComponentTintIndex(componentId: number, tintIndex: number): void
Parameters
Type | Name | Description |
---|---|---|
number | componentId | |
number | tintIndex |
getComponentTintIndex(number)
Declaration
public getComponentTintIndex(componentId: number): number
Parameters
Type | Name | Description |
---|---|---|
number | componentId |
Returns
Type | Description |
---|---|
number |
giveComponent(number)
Declaration
public giveComponent(componentType: number): void
Parameters
Type | Name | Description |
---|---|---|
number | componentType |
removeComponent(number)
Declaration
public removeComponent(componentType: number): void
Parameters
Type | Name | Description |
---|---|---|
number | componentType |