Skip to main content
Branch: Development

Checkpoint

Hierarchy

  • Colshape
    • Checkpoint

Index

Constructors

constructor

  • new Checkpoint(type: CheckpointType, x: number, y: number, z: number, radius: number, height: number, r: number, g: number, b: number, a: number, streamingDistance: number): Checkpoint
  • new Checkpoint(type: CheckpointType, pos: IVector3, radius: number, height: number, color: RGBA, streamingDistance: number): Checkpoint

Properties

publicreadonlycolshapeType

colshapeType: ColShapeType

publicdimension

dimension: number

Object dimension.

Remarks

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

publicreadonlyheight

height: number

publicreadonlyid

id: number

publicreadonlymax

max: Vector3 | Vector2

publicreadonlymaxZ

maxZ: number

publicreadonlymin

min: Vector3 | Vector2

publicreadonlyminZ

minZ: number

publicplayersOnly

playersOnly: boolean

Whether this colshape should only trigger its enter/leave events for players or all entities.

publicreadonlypoints

points: readonly Vector2[]

publicpos

pos: Vector3

Object position.

publicreadonlyradius

radius: number

publicreadonlyrefCount

refCount: number

Returns the ref count of the entity.

Remarks

It’s only available in debug-mode.

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

publicdeleteStreamSyncedMeta

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

publicdeleteSyncedMeta

  • deleteSyncedMeta(key: string): void
  • deleteSyncedMeta<K>(key: K): void
  • Removes the specified key and the data connected to that specific key.

publicdestroy

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

publicgetMeta

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

    • K: string

publicgetMetaDataKeys

  • getMetaDataKeys(): readonly string[]

publicgetStreamSyncedMeta

  • getStreamSyncedMeta<K>(key: Exclude<K, never>): unknown
  • getStreamSyncedMeta<K>(key: K): undefined | ICustomPlayerStreamSyncedMeta[K]
  • Type parameters

    • K: string

publicgetStreamSyncedMetaKeys

  • getStreamSyncedMetaKeys(): 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

publichasStreamSyncedMeta

  • hasStreamSyncedMeta(key: string): boolean
  • hasStreamSyncedMeta<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
  • isEntityIn(entityID: number): boolean

publicisPointIn

  • isPointIn(position: IVector3): boolean

publicsetMeta

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

    • K: string

publicsetStreamSyncedMeta

  • setStreamSyncedMeta<K>(key: K, value: InterfaceValueByKey<ICustomPlayerStreamSyncedMeta, K, unknown, void>): void
  • setStreamSyncedMeta<K>(key: K, value: ICustomPlayerStreamSyncedMeta[K]): void
  • Type parameters

    • K: string

publicsetSyncedMeta

  • setSyncedMeta<K>(key: K, value: InterfaceValueByKey<ICustomBaseObjectSyncedMeta, K, unknown, void>): void
  • setSyncedMeta<K>(key: K, value: ICustomBaseObjectSyncedMeta[K]): void
  • setSyncedMeta<V, K>(key: K, value: InterfaceValueByKey<ICustomBaseObjectSyncedMeta, K, V, void>): void
  • Stores the given value with the specified key.

    Remarks

    The given value will be shared with all clients.


    Type parameters

    • K: string

publicstaticgetByID

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