Class LocalVehicle
Inheritance
BaseObject
LocalVehicle
Inherited Members
Vehicle.type
Vehicle.valid
Vehicle.id
Vehicle.destroy
Vehicle.getMetaDataKeys
Vehicle.refCount
Package: @altmp/altv-types
Syntax
class LocalVehicle extends Vehicle
Constructors
|
Improve this Doc
View Source
LocalVehicle(string | number, number, IVector3, IVector3)
Declaration
public LocalVehicle(model: string | number, dimension: number, pos: IVector3, rot: IVector3): LocalVehicle
Parameters
Type |
Name |
Description |
string | number |
model |
|
number |
dimension |
|
IVector3 |
pos |
|
IVector3 |
rot |
|
|
Improve this Doc
View Source
LocalVehicle(string | number, number, IVector3, IVector3, true, number)
Declaration
public LocalVehicle(model: string | number, dimension: number, pos: IVector3, rot: IVector3, useStreaming: true, streamingDistance: number): LocalVehicle
Parameters
Type |
Name |
Description |
string | number |
model |
|
number |
dimension |
|
IVector3 |
pos |
|
IVector3 |
rot |
|
true |
useStreaming |
|
number |
streamingDistance |
|
Properties
|
Improve this Doc
View Source
model
Declaration
public get model(): number
public set model(model: string | number): void
Parameters
Type |
Name |
Description |
string | number |
model |
|
Property Value
|
Improve this Doc
View Source
rot
Declaration
Property Value
|
Improve this Doc
View Source
streamingDistance
Declaration
public readonly streamingDistance: number
Property Value
|
Improve this Doc
View Source
visible
Declaration
Property Value
|
Improve this Doc
View Source
scriptID
Declaration
public readonly scriptID: number
Property Value
|
Improve this Doc
View Source
isStreamedIn
Declaration
public readonly isStreamedIn: boolean
Property Value
|
Improve this Doc
View Source
speed
Declaration
public readonly speed: number
Property Value
|
Improve this Doc
View Source
gear
Declaration
Property Value
|
Improve this Doc
View Source
maxGear
Declaration
public readonly maxGear: number
Property Value
|
Improve this Doc
View Source
rpm
Declaration
Property Value
|
Improve this Doc
View Source
wheelsCount
Declaration
public readonly wheelsCount: number
Property Value
|
Improve this Doc
View Source
speedVector
Declaration
public readonly speedVector: Vector3
Property Value
|
Improve this Doc
View Source
engineOn
Declaration
public readonly engineOn: boolean
Property Value
|
Improve this Doc
View Source
lockState
Declaration
public readonly lockState: VehicleLockState
Property Value
|
Improve this Doc
View Source
petrolTankHealth
Declaration
public readonly petrolTankHealth: number
Property Value
|
Improve this Doc
View Source
indicatorLights
Declaration
public indicatorLights: VehicleIndicatorLights
Property Value
|
Improve this Doc
View Source
seatCount
Declaration
public readonly seatCount: number
Property Value
|
Improve this Doc
View Source
engineTemperature
Declaration
public engineTemperature: number
Property Value
|
Improve this Doc
View Source
fuelLevel
Declaration
Property Value
|
Improve this Doc
View Source
oilLevel
Declaration
Property Value
|
Improve this Doc
View Source
suspensionHeight
Declaration
public suspensionHeight: number
Property Value
Methods
|
Improve this Doc
View Source
getByID(number)
Declaration
public static getByID(id: number): null | LocalVehicle
Parameters
Type |
Name |
Description |
number |
id |
|
Returns
|
Improve this Doc
View Source
getByScriptID(number)
Declaration
public static getByScriptID(scriptID: number): null | LocalVehicle
Parameters
Type |
Name |
Description |
number |
scriptID |
|
Returns
|
Improve this Doc
View Source
waitForSpawn(number)
Declaration
public waitForSpawn(timeout?: number): Promise<void>
Parameters
Type |
Name |
Description |
number |
timeout |
|
Returns
Type |
Description |
Promise<void> |
|
|
Improve this Doc
View Source
getWheelCamber(number)
Declaration
public getWheelCamber(wheelIndex: number): number
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
Returns
|
Improve this Doc
View Source
setWheelCamber(number, number)
Declaration
public setWheelCamber(wheelIndex: number, camber: number): void
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
number |
camber |
|
|
Improve this Doc
View Source
getWheelTrackWidth(number)
Declaration
public getWheelTrackWidth(wheelIndex: number): number
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
Returns
|
Improve this Doc
View Source
setWheelTrackWidth(number, number)
Declaration
public setWheelTrackWidth(wheelIndex: number, width: number): void
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
number |
width |
|
|
Improve this Doc
View Source
getWheelHeight(number)
Declaration
public getWheelHeight(wheelIndex: number): number
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
Returns
|
Improve this Doc
View Source
setWheelHeight(number, number)
Declaration
public setWheelHeight(wheelIndex: number, height: number): void
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
number |
height |
|
|
Improve this Doc
View Source
getWheelTyreRadius(number)
Declaration
public getWheelTyreRadius(wheelIndex: number): number
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
Returns
|
Improve this Doc
View Source
setWheelTyreRadius(number, number)
Declaration
public setWheelTyreRadius(wheelIndex: number, radius: number): void
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
number |
radius |
|
|
Improve this Doc
View Source
getWheelRimRadius(number)
Declaration
public getWheelRimRadius(wheelIndex: number): number
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
Returns
|
Improve this Doc
View Source
setWheelRimRadius(number, number)
Declaration
public setWheelRimRadius(wheelIndex: number, radius: number): void
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
number |
radius |
|
|
Improve this Doc
View Source
getWheelTyreWidth(number)
Declaration
public getWheelTyreWidth(wheelIndex: number): number
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
Returns
|
Improve this Doc
View Source
setWheelTyreWidth(number, number)
Declaration
public setWheelTyreWidth(wheelIndex: number, width: number): void
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
number |
width |
|
|
Improve this Doc
View Source
getWheelSurfaceMaterial(number)
Declaration
public getWheelSurfaceMaterial(wheel: number): number
Parameters
Type |
Name |
Description |
number |
wheel |
|
Returns