Skip to main content
Branch: Release Candidate

Checkpoint

Hierarchy

  • WorldObject
    • Checkpoint

Index

Constructors

constructor

  • new Checkpoint(type: CheckpointType, pos: IVector3, nextPos: IVector3, radius: number, height: number, rgbColor: RGBA, iconColor: RGBA, streamingDistance: number): Checkpoint

Properties

publiccheckpointType

checkpointType: CheckpointType

publiccolor

color: RGBA

publicdimension

dimension: number

Object dimension.

Remarks

Check https://docs.altv.mp/articles/dimensions.html to understand how it works.

publicheight

height: number

publiciconColor

iconColor: RGBA

publicreadonlyid

id: number

publicreadonlyisRemote

isRemote: boolean

Whether this entity was created clientside or serverside. (Clientside = false, Serverside = true).

publicreadonlyisStreamedIn

isStreamedIn: boolean

publicnextPos

nextPos: Vector3

publicpos

pos: Vector3

Object position

publicradius

radius: number

publicreadonlyrefCount

refCount: number

Returns the ref count of the entity.

Remarks

It’s only available in debug-mode.

publicreadonlyremoteID

remoteID: number

The serverside id of this entity.

publicreadonlyscriptID

scriptID: number

publicreadonlystreamingDistance

streamingDistance: number

Streaming range for the checkpoint

publicreadonlytype

type: BaseObjectType

Type of the object.

publicreadonlyvalid

valid: boolean

Object usability.

Returns

False if object is no longer usable.

publicvisible

visible: boolean

publicstaticreadonlyall

all: readonly Checkpoint[]

publicstaticreadonlycount

count: number

Methods

publicdeleteMeta

  • deleteMeta(key: string): void
  • deleteMeta<K>(key: K): void

publicdestroy

  • destroy(): void
  • Removes the object from the world.

publicgetMeta

  • getMeta<K>(key: Exclude<K, never>): unknown
  • getMeta<K>(key: K): undefined | ICustomCheckpointMeta[K]
  • getMeta<V>(key: string): undefined | V
  • Type parameters

    • K: string

publicgetMetaDataKeys

  • getMetaDataKeys(): readonly string[]

publicgetSyncedMeta

  • getSyncedMeta<K>(key: Exclude<K, never>): unknown
  • getSyncedMeta<K>(key: K): undefined | ICustomBaseObjectSyncedMeta[K]
  • getSyncedMeta<V>(key: string): undefined | V
  • Gets a value using the specified key.


    Type parameters

    • K: string

publicgetSyncedMetaKeys

  • getSyncedMetaKeys(): readonly string[]

publichasMeta

  • hasMeta(key: string): boolean
  • hasMeta<K>(key: K): boolean

publichasSyncedMeta

  • hasSyncedMeta(key: string): boolean
  • hasSyncedMeta<K>(key: K): boolean
  • Determines whether contains the specified key.

publicisEntityIn

  • isEntityIn(entity: Entity): boolean

publicisPointIn

  • isPointIn(pos: IVector3): boolean

publicsetMeta

  • setMeta<K>(key: K, value: InterfaceValueByKey<ICustomCheckpointMeta, K, unknown, void>): void
  • setMeta<K>(key: K, value: ICustomCheckpointMeta[K]): void
  • setMeta<V, K>(key: K, value: InterfaceValueByKey<ICustomCheckpointMeta, K, V, void>): void
  • Type parameters

    • K: string

publicstaticgetByID

  • getByID(id: number): null | Checkpoint
  • Retrieves the checkpoint from the pool.

publicstaticgetByRemoteID

  • getByRemoteID(type: BaseObjectType, id: number): null | BaseObject

publicstaticgetByScriptID

  • getByScriptID(scriptID: number): null | Checkpoint