Skip to main content

ColshapeCuboid

Hierarchy

  • Colshape
    • ColshapeCuboid

Index

Constructors

constructor

  • new ColshapeCuboid(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): ColshapeCuboid

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

publicreadonlyisRemote

isRemote: boolean

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

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.

publicreadonlyremoteID

remoteID: number

The serverside id of this entity.

publicreadonlytype

type: BaseObjectType

Type of the object.

publicreadonlyvalid

valid: boolean

Object usability.

Returns

False if object is no longer usable.

publicstaticreadonlyall

all: readonly Colshape[]

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 | ICustomColshapeMeta[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
  • isEntityIn(entityID: number): boolean

publicisPointIn

  • isPointIn(position: IVector3): boolean

publicsetMeta

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

    • K: string

publicstaticgetByID

  • getByID(id: number): null | Colshape
  • Retrieves the colshape from the pool.

publicstaticgetByRemoteID

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