Skip to content

ObjectManager

@vimp-mp/types 2.0.1

Interface · Server API

Manages object instances in this scripting context.

ts
interface ObjectManager

Members

all

ts
readonly all: Array<GameObject>

All currently alive objects.

create

ts
create(model: number, x: number, y: number, z: number, rx: number, ry: number, rz: number, extras?: ObjectCreateOptions): GameObject | null

Create a world object. Rotation (rx, ry, rz) is in degrees. Returns the object handle, or null on failure.

destroy

ts
destroy(id: number): boolean

Destroy an object by id. Prefer object.destroy() when you hold the instance — this is a convenience for callers that only have the id.

getById

ts
getById(id: number): GameObject | null

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

VIMP developer documentation