ColshapeManager
@vimp-mp/types 2.0.1Manages colshape instances in this scripting context.
ts
interface ColshapeManagerMembers
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 | nullCreate 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 | nullCreate 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 | nullCreate 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 | nullCreate a 3D sphere colshape. Returns null if the server is full.
destroy
ts
destroy(id: number): booleanDestroy a colshape by id. Prefer colshape.destroy() when you hold the instance.
getById
ts
getById(id: number): Colshape | nullReturns the colshape with id, or null when it does not exist.