Skip to content

ColshapeManager

@vimp-mp/types 2.0.1

Interface · Server API

Manages colshape instances in this scripting context.

ts
interface ColshapeManager

Members

all

ts
readonly all: Array<Colshape>

Snapshot of all currently alive colshapes.

createCircle

ts
createCircle(x: number, y: number, z: number, radius: number, extras?: ColshapeExtras): Colshape | null

Create a 2D circle (Z is ignored). Returns null if the server is full.

createCube

ts
createCube(x: number, y: number, z: number, sizeX: number, sizeY: number, sizeZ: number, extras?: ColshapeExtras): Colshape | null

Create an axis-aligned box. sizeX/Y/Z are HALF-extents — the box spans [center - size, center + size] on each axis.

createCylinder

ts
createCylinder(x: number, y: number, z: number, radius: number, height: number, extras?: ColshapeExtras): Colshape | null

Create a vertical cylinder with the given 2D radius and Z height.

createSphere

ts
createSphere(x: number, y: number, z: number, radius: number, extras?: ColshapeExtras): Colshape | null

Create a 3D sphere colshape. Returns null if the server is full.

destroy

ts
destroy(id: number): boolean

Destroy a colshape by id. Prefer colshape.destroy() when you hold the instance.

getById

ts
getById(id: number): Colshape | null

Returns the colshape with id, or null when it does not exist.

VIMP developer documentation