Class Entity
Inheritance
BaseObject
Entity
Inherited Members
WorldObject.constructor
WorldObject.type
WorldObject.valid
WorldObject.id
WorldObject.destroy
WorldObject.getMetaDataKeys
WorldObject.refCount
Package: @altmp/altv-types
Syntax
class Entity extends WorldObject
Properties
|
Improve this Doc
View Source
all
Declaration
public readonly static all: readonly Entity[]
Property Value
Type |
Description |
readonly Entity[] |
|
|
Improve this Doc
View Source
scriptID
Declaration
public readonly scriptID: number
Property Value
|
Improve this Doc
View Source
netOwner
Declaration
public readonly netOwner: null | Player
Property Value
Type |
Description |
null | Player |
|
|
Improve this Doc
View Source
isSpawned
Declaration
public readonly isSpawned: boolean
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
visible
Declaration
public readonly visible: boolean
Property Value
|
Improve this Doc
View Source
frozen
Declaration
Property Value
Methods
|
Improve this Doc
View Source
getByScriptID(number)
Declaration
public static getByScriptID(scriptID: number): null | Entity
Parameters
Type |
Name |
Description |
number |
scriptID |
|
Returns
Type |
Description |
null | Entity |
|
|
Improve this Doc
View Source
Declaration
public setMeta<K extends string>(key: K, value: InterfaceValueByKey<ICustomEntityMeta, K, unknown, void>): void
Parameters
Type |
Name |
Description |
K |
key |
|
InterfaceValueByKey<ICustomEntityMeta, K, unknown, void> |
value |
|
|
Improve this Doc
View Source
Declaration
public setMeta<K extends never>(key: K, value: ICustomEntityMeta[K]): void
Parameters
|
Improve this Doc
View Source
Declaration
public setMeta<V extends unknown, K extends string>(key: K, value: InterfaceValueByKey<ICustomEntityMeta, K, V, void>): void
Parameters
|
Improve this Doc
View Source
Declaration
public setMeta(values: MetaValues<ICustomEntityMeta>): 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 | ICustomEntityMeta[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 | ICustomEntitySyncedMeta[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 getSyncedMetaKeys(): readonly string[]
Returns
Type |
Description |
readonly string[] |
|
|
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 | ICustomEntityStreamSyncedMeta[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
|
Improve this Doc
View Source
Declaration
public getStreamSyncedMetaKeys(): readonly string[]
Returns
Type |
Description |
readonly string[] |
|
|
Improve this Doc
View Source
getSyncInfo()
Declaration
public getSyncInfo(): ISyncInfo
Returns