Skip to content

VehicleManager

@vimp-mp/types 2.0.1

Interface · Client API

Creates local vehicles and tracks server-owned vehicle wrappers.

ts
interface VehicleManager

Members

all

ts
readonly all: Array<Vehicle>

All known non-destroyed vehicles, including remote vehicles with handle === 0.

count

ts
readonly count: number

Number of known non-destroyed vehicles.

create

ts
create(model: string | number, position: Vec3, rotation?: Vec3, options?: VehicleCreateOptions): Vehicle | null

Creates a client-local vehicle, or returns null if its model cannot be loaded.

destroy

ts
destroy(id: number): boolean

Destroys the client-local vehicle identified by its wrapper id.

getById

ts
getById(id: number): Vehicle | null

Returns a known vehicle by client-local wrapper id.

getByRemoteId

ts
getByRemoteId(remoteId: number): Vehicle | null

Returns a remote vehicle by server/network id, including vehicles that are not currently streamed.

getDisplayNameFromModel

ts
getDisplayNameFromModel(model: string | number): string

Returns GTA's localized display-name key for a vehicle model.

VIMP developer documentation