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
netOwner
Declaration
public readonly netOwner: null | Player
Property Value
Type |
Description |
null | Player |
|
|
Improve this Doc
View Source
model
Declaration
public get model(): number
public set model(model: string | number): void
Parameters
Type |
Name |
Description |
string | number |
model |
|
Property Value
|
Improve this Doc
View Source
rot
Declaration
Property Value
|
Improve this Doc
View Source
visible
Declaration
Property Value
|
Improve this Doc
View Source
streamed
Declaration
Property Value
|
Improve this Doc
View Source
frozen
Declaration
Property Value
|
Improve this Doc
View Source
collision
Declaration
public collision: boolean
Property Value
|
Improve this Doc
View Source
streamingDistance
Declaration
public streamingDistance: number
Property Value
|
Improve this Doc
View Source
timestamp
Declaration
public readonly timestamp: number
Property Value
Methods
|
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 deleteSyncedMeta(key: string): void
Parameters
Type |
Name |
Description |
string |
key |
|
|
Improve this Doc
View Source
Declaration
public deleteSyncedMeta<K extends never>(key: K): void
Parameters
Type |
Name |
Description |
K |
key |
|
|
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 setSyncedMeta<K extends string>(key: K, value: InterfaceValueByKey<ICustomEntitySyncedMeta, K, unknown, void>): void
Parameters
|
Improve this Doc
View Source
Declaration
public setSyncedMeta<K extends never>(key: K, value: ICustomEntitySyncedMeta[K]): void
Parameters
|
Improve this Doc
View Source
Declaration
public setSyncedMeta<V extends unknown, K extends string>(key: K, value: InterfaceValueByKey<ICustomEntitySyncedMeta, K, V, void>): void
Parameters
|
Improve this Doc
View Source
Declaration
public setSyncedMeta(values: MetaValues<ICustomEntitySyncedMeta>): void
Parameters
|
Improve this Doc
View Source
Declaration
public deleteStreamSyncedMeta(key: string): void
Parameters
Type |
Name |
Description |
string |
key |
|
|
Improve this Doc
View Source
Declaration
public deleteStreamSyncedMeta<K extends never>(key: K): void
Parameters
Type |
Name |
Description |
K |
key |
|
|
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
Declaration
public setStreamSyncedMeta<K extends string>(key: K, value: InterfaceValueByKey<ICustomEntityStreamSyncedMeta, K, unknown, void>): void
Parameters
|
Improve this Doc
View Source
Declaration
public setStreamSyncedMeta<K extends never>(key: K, value: ICustomEntityStreamSyncedMeta[K]): void
Parameters
|
Improve this Doc
View Source
Declaration
public setStreamSyncedMeta<V extends unknown, K extends string>(key: K, value: InterfaceValueByKey<ICustomEntityStreamSyncedMeta, K, V, void>): void
Parameters
|
Improve this Doc
View Source
Declaration
public setStreamSyncedMeta(values: MetaValues<ICustomEntityStreamSyncedMeta>): void
Parameters
|
Improve this Doc
View Source
setNetOwner(Player, boolean)
Declaration
public setNetOwner(player: Player, disableMigration?: boolean): void
Parameters
Type |
Name |
Description |
Player |
player |
|
boolean |
disableMigration |
|
|
Improve this Doc
View Source
resetNetOwner(boolean)
Declaration
public resetNetOwner(disableMigration?: boolean): void
Parameters
Type |
Name |
Description |
boolean |
disableMigration |
|
|
Improve this Doc
View Source
attachTo(Entity, string | number, string | number, IVector3, IVector3, boolean, boolean)
Declaration
public attachTo(entity: Entity, entityBone: string | number, ownBone: string | number, pos: IVector3, rot: IVector3, enableCollisions: boolean, noFixedRotation: boolean): void
Parameters
Type |
Name |
Description |
Entity |
entity |
|
string | number |
entityBone |
|
string | number |
ownBone |
|
IVector3 |
pos |
|
IVector3 |
rot |
|
boolean |
enableCollisions |
|
boolean |
noFixedRotation |
|
|
Improve this Doc
View Source
detach()
Declaration