Skip to content

VehicleManager

@vimp-mp/types 2.0.1

Interface · Server API

Creates and tracks authoritative server vehicles.

ts
interface VehicleManager

Members

all

ts
readonly all: Array<Vehicle>

All currently alive vehicles.

create

ts
create(model: number, x: number, y: number, z: number, heading: number, extras?: VehicleExtras): Vehicle | null

Create a vehicle. Rotation is derived from heading (yaw only). Returns the vehicle handle, or null on failure.

destroy

ts
destroy(id: number): boolean

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

getById

ts
getById(id: number): Vehicle | null

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

VIMP developer documentation