Class Player
Inheritance
BaseObject
Player
Inherited Members
Entity.model
Entity.constructor
Entity.type
Entity.valid
Entity.id
Entity.destroy
Entity.getMetaDataKeys
Entity.refCount
Package: @altmp/altv-types
Syntax
class Player extends Entity
Properties
|
Improve this Doc
View Source
all
Declaration
public readonly static all: readonly Player[]
Property Value
Type |
Description |
readonly Player[] |
|
|
Improve this Doc
View Source
count
Declaration
public readonly static count: number
Property Value
|
Improve this Doc
View Source
streamedIn
Declaration
public readonly static streamedIn: readonly Player[]
Property Value
Type |
Description |
readonly Player[] |
|
|
Improve this Doc
View Source
local
Declaration
public readonly static local: LocalPlayer
Property Value
|
Improve this Doc
View Source
isTalking
Declaration
public readonly isTalking: boolean
Property Value
|
Improve this Doc
View Source
micLevel
Declaration
public readonly micLevel: number
Property Value
|
Improve this Doc
View Source
name
Declaration
public readonly name: string
Property Value
|
Improve this Doc
View Source
vehicle
Declaration
public readonly vehicle: null | Vehicle | LocalVehicle
Property Value
|
Improve this Doc
View Source
isDead
Declaration
public readonly isDead: boolean
Property Value
|
Improve this Doc
View Source
currentWeaponComponents
Declaration
public readonly currentWeaponComponents: readonly number[]
Property Value
Type |
Description |
readonly number[] |
|
|
Improve this Doc
View Source
currentWeaponTintIndex
Declaration
public readonly currentWeaponTintIndex: number
Property Value
|
Improve this Doc
View Source
currentWeapon
Declaration
public readonly currentWeapon: number
Property Value
|
Improve this Doc
View Source
isInRagdoll
Declaration
public readonly isInRagdoll: boolean
Property Value
|
Improve this Doc
View Source
isAiming
Declaration
public readonly isAiming: boolean
Property Value
|
Improve this Doc
View Source
isReloading
Declaration
public readonly isReloading: boolean
Property Value
|
Improve this Doc
View Source
isEnteringVehicle
Declaration
public readonly isEnteringVehicle: boolean
Property Value
|
Improve this Doc
View Source
isLeavingVehicle
Declaration
public readonly isLeavingVehicle: boolean
Property Value
|
Improve this Doc
View Source
isOnLadder
Declaration
public readonly isOnLadder: boolean
Property Value
|
Improve this Doc
View Source
isInMelee
Declaration
public readonly isInMelee: boolean
Property Value
|
Improve this Doc
View Source
isInCover
Declaration
public readonly isInCover: boolean
Property Value
|
Improve this Doc
View Source
isParachuting
Declaration
public readonly isParachuting: boolean
Property Value
|
Improve this Doc
View Source
armour
Declaration
public readonly armour: number
Property Value
|
Improve this Doc
View Source
maxArmour
Declaration
public readonly maxArmour: number
Property Value
|
Improve this Doc
View Source
moveSpeed
Declaration
public readonly moveSpeed: number
Property Value
|
Improve this Doc
View Source
aimPos
Declaration
public readonly aimPos: Vector3
Property Value
|
Improve this Doc
View Source
headRot
Declaration
public readonly headRot: Vector3
Property Value
|
Improve this Doc
View Source
seat
Declaration
public readonly seat: number
Property Value
|
Improve this Doc
View Source
entityAimingAt
Declaration
public readonly entityAimingAt: null | Entity
Property Value
Type |
Description |
null | Entity |
|
|
Improve this Doc
View Source
entityAimOffset
Declaration
public readonly entityAimOffset: Vector3
Property Value
|
Improve this Doc
View Source
flashlightActive
Declaration
public readonly flashlightActive: boolean
Property Value
|
Improve this Doc
View Source
health
Declaration
public readonly health: number
Property Value
|
Improve this Doc
View Source
maxHealth
Declaration
public readonly maxHealth: number
Property Value
|
Improve this Doc
View Source
spatialVolume
Declaration
public spatialVolume: number
Property Value
|
Improve this Doc
View Source
nonSpatialVolume
Declaration
public nonSpatialVolume: number
Property Value
|
Improve this Doc
View Source
isCrouching
Declaration
public readonly isCrouching: boolean
Property Value
|
Improve this Doc
View Source
isStealthy
Declaration
public readonly isStealthy: boolean
Property Value
|
Improve this Doc
View Source
forwardSpeed
Declaration
public readonly forwardSpeed: number
Property Value
|
Improve this Doc
View Source
strafeSpeed
Declaration
public readonly strafeSpeed: number
Property Value
|
Improve this Doc
View Source
filter
Declaration
public filter: null | AudioFilter
Property Value
|
Improve this Doc
View Source
taskData
Declaration
public readonly taskData: string
Property Value
Methods
|
Improve this Doc
View Source
hasWeaponComponent(string | number, string | number)
Declaration
public hasWeaponComponent(weaponModel: string | number, component: string | number): boolean
Parameters
Type |
Name |
Description |
string | number |
weaponModel |
|
string | number |
component |
|
Returns
|
Improve this Doc
View Source
getWeaponTintIndex(string | number)
Declaration
public getWeaponTintIndex(weaponModel: string | number): number
Parameters
Type |
Name |
Description |
string | number |
weaponModel |
|
Returns
|
Improve this Doc
View Source
getByID(number)
Declaration
public static getByID(id: number): null | Player
Parameters
Type |
Name |
Description |
number |
id |
|
Returns
Type |
Description |
null | Player |
|
|
Improve this Doc
View Source
getByScriptID(number)
Declaration
public static getByScriptID(scriptID: number): null | Player
Parameters
Type |
Name |
Description |
number |
scriptID |
|
Returns
Type |
Description |
null | Player |
|
|
Improve this Doc
View Source
getByRemoteID(number)
Declaration
public static getByRemoteID(id: number): null | Player
Parameters
Type |
Name |
Description |
number |
id |
|
Returns
Type |
Description |
null | Player |
|
|
Improve this Doc
View Source
Declaration
public setMeta<K extends string>(key: K, value: InterfaceValueByKey<ICustomPlayerMeta, K, unknown, void>): void
Parameters
Type |
Name |
Description |
K |
key |
|
InterfaceValueByKey<ICustomPlayerMeta, K, unknown, void> |
value |
|
|
Improve this Doc
View Source
Declaration
public setMeta<K extends never>(key: K, value: ICustomPlayerMeta[K]): void
Parameters
|
Improve this Doc
View Source
Declaration
public setMeta<V extends unknown, K extends string>(key: K, value: InterfaceValueByKey<ICustomPlayerMeta, K, V, void>): void
Parameters
|
Improve this Doc
View Source
Declaration
public setMeta(values: MetaValues<ICustomPlayerMeta>): void
Parameters
|
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 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 | ICustomPlayerMeta[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 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 getSyncedMeta<K extends string>(key: Exclude<K, never>): unknown
Parameters
Type |
Name |
Description |
Exclude<K, never> |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getSyncedMeta<K extends never>(key: K): undefined | ICustomPlayerSyncedMeta[K]
Parameters
Type |
Name |
Description |
K |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getSyncedMeta<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 hasSyncedMeta(key: string): boolean
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public hasSyncedMeta<K extends never>(key: K): boolean
Parameters
Type |
Name |
Description |
K |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getStreamSyncedMeta<K extends string>(key: Exclude<K, never>): unknown
Parameters
Type |
Name |
Description |
Exclude<K, never> |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getStreamSyncedMeta<K extends never>(key: K): undefined | ICustomPlayerStreamSyncedMeta[K]
Parameters
Type |
Name |
Description |
K |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getStreamSyncedMeta<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 hasStreamSyncedMeta(key: string): boolean
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public hasStreamSyncedMeta<K extends never>(key: K): boolean
Parameters
Type |
Name |
Description |
K |
key |
|
Returns