Class LocalPlayer
Inheritance
BaseObject
LocalPlayer
Inherited Members
Player.model
Player.constructor
Player.type
Player.valid
Player.id
Player.destroy
Player.getMetaDataKeys
Player.refCount
Package: @altmp/altv-types
Syntax
class LocalPlayer extends Player
Properties
|
Improve this Doc
View Source
dimension
Declaration
public readonly dimension: number
Property Value
|
Improve this Doc
View Source
pos
Declaration
Property Value
|
Improve this Doc
View Source
rot
Declaration
Property Value
|
Improve this Doc
View Source
currentAmmo
Declaration
public readonly currentAmmo: number
Property Value
|
Improve this Doc
View Source
weapons
Declaration
public readonly weapons: readonly IWeapon[]
Property Value
Type |
Description |
readonly IWeapon[] |
|
|
Improve this Doc
View Source
currentWeaponData
Declaration
public readonly currentWeaponData: null | WeaponData
Property Value
|
Improve this Doc
View Source
stamina
Declaration
Property Value
|
Improve this Doc
View Source
maxStamina
Declaration
public maxStamina: number
Property Value
Methods
|
Improve this Doc
View Source
getWeaponAmmo(number)
Declaration
public getWeaponAmmo(hash: number): number
Parameters
Type |
Name |
Description |
number |
hash |
|
Returns
|
Improve this Doc
View Source
getWeaponAmmo(string)
Declaration
public getWeaponAmmo(weaponName: string): number
Parameters
Type |
Name |
Description |
string |
weaponName |
|
Returns
|
Improve this Doc
View Source
getWeaponComponents(number)
Declaration
public getWeaponComponents(hash: number): readonly number[]
Parameters
Type |
Name |
Description |
number |
hash |
|
Returns
Type |
Description |
readonly number[] |
|
|
Improve this Doc
View Source
getWeaponComponents(string)
Declaration
public getWeaponComponents(weaponName: string): readonly number[]
Parameters
Type |
Name |
Description |
string |
weaponName |
|
Returns
Type |
Description |
readonly number[] |
|
|
Improve this Doc
View Source
hasWeapon(number)
Declaration
public hasWeapon(hash: number): boolean
Parameters
Type |
Name |
Description |
number |
hash |
|
Returns
|
Improve this Doc
View Source
hasWeapon(string)
Declaration
public hasWeapon(weaponName: string): boolean
Parameters
Type |
Name |
Description |
string |
weaponName |
|
Returns
|
Improve this Doc
View Source
Declaration
public deleteMeta(key: string): void
Parameters
Type |
Name |
Description |
string |
key |
|
|
Improve this Doc
View Source
Declaration
public deleteMeta<K extends never>(key: K): void
Parameters
Type |
Name |
Description |
K |
key |
|
|
Improve this Doc
View Source
Declaration
public hasMeta(key: string): boolean
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public hasMeta<K extends never>(key: K): boolean
Parameters
Type |
Name |
Description |
K |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getMeta<K extends string>(key: Exclude<K, never>): unknown
Parameters
Type |
Name |
Description |
Exclude<K, never> |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getMeta<K extends never>(key: K): undefined | ICustomLocalPlayerMeta[K]
Parameters
Type |
Name |
Description |
K |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getMeta<V extends unknown>(key: string): undefined | V
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
Type |
Description |
undefined | V |
|
|
Improve this Doc
View Source
Declaration
public setMeta<K extends string>(key: K, value: InterfaceValueByKey<ICustomLocalPlayerMeta, K, unknown, void>): void
Parameters
|
Improve this Doc
View Source
Declaration
public setMeta<K extends never>(key: K, value: ICustomLocalPlayerMeta[K]): void
Parameters
|
Improve this Doc
View Source
Declaration
public setMeta<V extends unknown, K extends string>(key: K, value: InterfaceValueByKey<ICustomLocalPlayerMeta, K, V, void>): void
Parameters
|
Improve this Doc
View Source
Declaration
public setMeta(values: MetaValues<ICustomLocalPlayerMeta>): void
Parameters