VehicleManager
@vimp-mp/types 2.0.1Creates and tracks authoritative server vehicles.
ts
interface VehicleManagerMembers
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 | nullCreate a vehicle. Rotation is derived from heading (yaw only). Returns the vehicle handle, or null on failure.
destroy
ts
destroy(id: number): booleanDestroy 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 | nullReturns the vehicle with id, or null when it does not exist.