Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Vehicle

Hierarchy

Index

Properties

Readonly activeRadioStation

activeRadioStation: number

Vehicle active radio station.

beta

Readonly bodyAdditionalHealth

bodyAdditionalHealth: number

The vehicle's additional body health.

beta

Readonly bodyHealth

bodyHealth: number

The vehicle's body health.

beta

Readonly customPrimaryColor

customPrimaryColor: RGBA

Custom (RGB) vehicle primary color.

beta

Readonly customSecondaryColor

customSecondaryColor: RGBA

Custom (RGB) vehicle secondary color.

beta

Readonly customTires

customTires: boolean

Are custom tires active.

beta

Readonly darkness

darkness: number

Vehicle darkness.

beta

Readonly dashboardColor

dashboardColor: number

Vehicle dashboard color.

beta

Readonly daylightOn

daylightOn: boolean

Vehicle daylight state.

beta

Readonly destroyed

destroyed: boolean

Is the vehicle destroyed.

beta

Readonly dirtLevel

dirtLevel: number

Vehicle dirt level.

beta

Readonly engineHealth

engineHealth: number

The vehicle's engine health.

beta

Readonly engineOn

engineOn: boolean

Vehicle engine state.

beta

Readonly flamethrowerActive

flamethrowerActive: boolean

Vehicle flamethrower state.

beta

Readonly frontWheels

frontWheels: number

Vehicle front wheels variation.

beta

gear

gear: number

Vehicle gear

Readonly handbrakeActive

handbrakeActive: boolean

Vehicle handbrake state.

beta

handling

Vehicle handling, which affects how vehicle responds and reacts to the inputs of a driver.

beta

Readonly hasArmoredWindows

hasArmoredWindows: boolean

Does the vehicle currently have the bulletproof windows?

beta

Readonly headlightColor

headlightColor: number

Vehicle headlight color.

beta

Readonly id

id: number

Entity unique id

Readonly interiorColor

interiorColor: number

Vehicle interior color.

beta

Readonly lightsMultiplier

lightsMultiplier: number

Vehicle lights multiplier.

beta

Readonly livery

livery: number

Vehicle livery.

beta

Readonly lockState

lockState: number

Vehicle lock state.

beta

Readonly manualEngineControl

manualEngineControl: boolean

Determines whether the vehicle's engine should be turned on/off automatically.

beta

Readonly modKit

modKit: number

Current vehicle modkit.

beta

Readonly modKitsCount

modKitsCount: number

Available modkits for the vehicle.

beta

Readonly model

model: number

Hash of entity model

Readonly neon

Vehicle neon.

beta

Readonly neonColor

neonColor: RGBA

Vehicle neon color.

beta

Readonly nightlightOn

nightlightOn: boolean

Vehicle nightlight state.

beta

Readonly numberPlateIndex

numberPlateIndex: number

Vehicle number plate type index.

beta

Readonly numberPlateText

numberPlateText: string

Vehicle number plate text.

beta

Readonly pearlColor

pearlColor: number

Vehicle pearl color.

beta

Readonly petrolTankHealth

petrolTankHealth: number

The vehicle's petrol tank health.

beta

Readonly pos

pos: Vector3

Object position

Readonly primaryColor

primaryColor: number

Vehicle primary color.

beta

Readonly rearWheels

rearWheels: number

Vehicle rear wheels variation.

beta

Readonly repairsCount

repairsCount: number

Vehicle repairs count.

beta

Readonly roofLivery

roofLivery: number

Vehicle roof livery.

beta

Readonly roofState

roofState: number

Vehicle roof state.

beta

Readonly rot

rot: Vector3

Entity rotation in radians

Readonly rpm

rpm: number

Vehicle RPM

returns

Normalised value on a scale of [0, 1].

Readonly scriptID

scriptID: number

Internal game id that can be used in native calls

Readonly secondaryColor

secondaryColor: number

Vehicle secondary color.

beta

Readonly sirenActive

sirenActive: boolean

Vehicle siren state.

beta

Readonly speed

speed: number

Vehicle wheels speed

Readonly speedVector

speedVector: Vector3

Vehicle speed vector

Readonly tireSmokeColor

tireSmokeColor: number

Vehicle tire smoke color.

beta

Readonly type

Type of the object.

Readonly valid

valid: boolean

Object usability.

returns

False if object is no longer usable.

Readonly visible

visible: boolean
beta

Readonly wheelColor

wheelColor: number

Vehicle wheel color.

beta

Readonly wheelType

wheelType: number

Vehicle wheel type.

beta

Readonly wheelsCount

wheelsCount: number

Vehicle wheels count

Readonly windowTint

windowTint: number

Vehicle window tint.

beta

Static Readonly all

all: Array<Vehicle>

Array with all vehicles

Methods

deleteMeta

  • deleteMeta(key: string): void

destroy

  • destroy(): void

getMeta

  • getMeta(key: string): any
  • Gets a value using the specified key.

    Parameters

    • key: string

      The key of the value to get.

    Returns any

    Dynamic value associated with the specified key.

getStreamSyncedMeta

  • getStreamSyncedMeta(key: string): any

getSyncedMeta

  • getSyncedMeta(key: string): any
  • Gets a value using the specified key.

    Parameters

    • key: string

      The key of the value to get.

    Returns any

    Dynamic value associated with the specified key.

hasMeta

  • hasMeta(key: string): boolean
  • Determines whether contains the specified key.

    Parameters

    • key: string

      The key of the value to locate.

    Returns boolean

    True when element associated with the specified key is stored.

hasStreamSyncedMeta

  • hasStreamSyncedMeta(key: string): boolean
  • Determines whether contains the specified key.

    Parameters

    • key: string

      The key of the value to locate.

    Returns boolean

    Return is dependent on whether element associated with the specified key is stored.

hasSyncedMeta

  • hasSyncedMeta(key: string): boolean
  • Determines whether contains the specified key.

    Parameters

    • key: string

      The key of the value to locate.

    Returns boolean

    Return is dependent on whether element associated with the specified key is stored.

setMeta

  • setMeta(key: string, value: any): void
  • Stores the given value with the specified key.

    remarks

    The given value will be shared locally.

    Parameters

    • key: string

      The key of the value to store.

    • value: any

    Returns void

Static getByID

  • getByID(id: number): Vehicle | null

Static getByScriptID

  • getByScriptID(scriptID: number): Vehicle | null