Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Checkpoint

Hierarchy

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

Readonly colshapeType

colshapeType: ColShapeType

dimension

dimension: number

Object dimension.

remarks

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

Readonly height

height: number

Readonly id

id: number

Readonly max

Readonly maxZ

maxZ: number

Readonly min

Readonly minZ

minZ: number

playersOnly

playersOnly: boolean

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

Readonly points

points: readonly Vector2[]

pos

pos: Vector3

Object position.

Readonly radius

radius: number

Readonly refCount

refCount: number

Returns the ref count of the entity.

remarks

It's only available in debug-mode.

Readonly streamingDistance

streamingDistance: number

Streaming range for the checkpoint

Readonly type

Type of the object.

Readonly valid

valid: boolean

Object usability.

returns

False if object is no longer usable.

visible

visible: boolean

Static Readonly all

all: readonly Checkpoint[]

Static Readonly count

count: number

Methods

deleteMeta

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

deleteStreamSyncedMeta

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

    • key: string

    Returns void

  • Type parameters

    Parameters

    • key: K

    Returns void

deleteSyncedMeta

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

    Parameters

    • key: string

      The key of the value to remove.

    Returns void

  • Type parameters

    Parameters

    • key: K

    Returns void

destroy

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

    Returns void

getMeta

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

    • K: string

    Parameters

    Returns unknown

  • Type parameters

    Parameters

    • key: K

    Returns ICustomCheckpointMeta[K] | undefined

getMetaDataKeys

  • getMetaDataKeys(): readonly string[]

getStreamSyncedMeta

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

    • K: string

    Parameters

    Returns unknown

  • Type parameters

    Parameters

    • key: K

    Returns ICustomPlayerStreamSyncedMeta[K] | undefined

getStreamSyncedMetaKeys

  • getStreamSyncedMetaKeys(): readonly string[]
  • Returns readonly string[]

getSyncedMeta

  • getSyncedMeta<K>(key: Exclude<K, keyof ICustomBaseObjectSyncedMeta>): unknown
  • getSyncedMeta<K>(key: K): ICustomBaseObjectSyncedMeta[K] | undefined
  • getSyncedMeta<V>(key: string): V | undefined

getSyncedMetaKeys

  • getSyncedMetaKeys(): readonly string[]

hasMeta

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

    • key: string

    Returns boolean

  • Type parameters

    Parameters

    • key: K

    Returns boolean

hasStreamSyncedMeta

  • hasStreamSyncedMeta(key: string): boolean
  • hasStreamSyncedMeta<K>(key: K): boolean
  • Parameters

    • key: string

    Returns boolean

  • Type parameters

    Parameters

    • key: K

    Returns boolean

hasSyncedMeta

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

    Parameters

    • key: string

      The key of the value to locate.

    Returns boolean

    True if the meta table contains any data at the specified key or False if not

  • Type parameters

    Parameters

    • key: K

    Returns boolean

isEntityIn

  • isEntityIn(entity: Entity): boolean
  • isEntityIn(entityID: number): boolean
  • Parameters

    Returns boolean

  • Parameters

    • entityID: number

    Returns boolean

isPointIn

  • isPointIn(position: IVector3): boolean

setMeta

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

    • K: string

    Parameters

    Returns void

  • Type parameters

    Parameters

    • key: K
    • value: ICustomCheckpointMeta[K]

    Returns void

setStreamSyncedMeta

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

    • K: string

    Parameters

    Returns void

  • Type parameters

    Parameters

    • key: K
    • value: ICustomPlayerStreamSyncedMeta[K]

    Returns void

setSyncedMeta

  • setSyncedMeta<K>(key: K, value: shared.InterfaceValueByKey<ICustomBaseObjectSyncedMeta, K>): void
  • setSyncedMeta<K>(key: K, value: ICustomBaseObjectSyncedMeta[K]): void
  • setSyncedMeta<V, K>(key: K, value: shared.InterfaceValueByKey<ICustomBaseObjectSyncedMeta, K, V>): void

Static getByID

  • Retrieves the checkpoint from the pool.

    Parameters

    • id: number

      The id of the checkpoint.

    Returns Checkpoint | null

    Entity if it was found, otherwise null.