Class Vehicle
Inheritance
BaseObject
Vehicle
Inherited Members
Entity.model
Entity.constructor
Entity.type
Entity.valid
Entity.id
Entity.destroy
Entity.getMetaDataKeys
Entity.refCount
Package: @altmp/altv-types
Syntax
class Vehicle extends Entity
Properties
|
Improve this Doc
View Source
all
Declaration
public readonly static all: readonly Vehicle[]
Property Value
Type |
Description |
readonly Vehicle[] |
|
|
Improve this Doc
View Source
count
Declaration
public readonly static count: number
Property Value
|
Improve this Doc
View Source
streamedIn
Declaration
public readonly static streamedIn: readonly Vehicle[]
Property Value
Type |
Description |
readonly Vehicle[] |
|
|
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
handling
Declaration
public handling: IVehicleHandling
Property Value
|
Improve this Doc
View Source
indicatorLights
Declaration
public indicatorLights: VehicleIndicatorLights
Property Value
|
Improve this Doc
View Source
rpm
Declaration
Property Value
|
Improve this Doc
View Source
speed
Declaration
public readonly speed: number
Property Value
|
Improve this Doc
View Source
speedVector
Declaration
public readonly speedVector: Vector3
Property Value
|
Improve this Doc
View Source
seatCount
Declaration
public readonly seatCount: number
Property Value
|
Improve this Doc
View Source
wheelsCount
Declaration
public readonly wheelsCount: number
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
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
engineLight
Declaration
public engineLight: boolean
Property Value
|
Improve this Doc
View Source
absLight
Declaration
Property Value
|
Improve this Doc
View Source
petrolLight
Declaration
public petrolLight: boolean
Property Value
|
Improve this Doc
View Source
oilLight
Declaration
Property Value
|
Improve this Doc
View Source
batteryLight
Declaration
public batteryLight: boolean
Property Value
|
Improve this Doc
View Source
steeringAngle
Declaration
public steeringAngle: number
Property Value
Methods
|
Improve this Doc
View Source
getWheelSurfaceMaterial(number)
Declaration
public getWheelSurfaceMaterial(wheel: number): number
Parameters
Type |
Name |
Description |
number |
wheel |
|
Returns
|
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
getWheelDynamicFlag(number, number)
Declaration
public getWheelDynamicFlag(wheelIndex: number, flag: number): boolean
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
number |
flag |
|
Returns
|
Improve this Doc
View Source
setWheelDynamicFlag(number, number, boolean)
Declaration
public setWheelDynamicFlag(wheelIndex: number, flag: number, value: boolean): void
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
number |
flag |
|
boolean |
value |
|
|
Improve this Doc
View Source
getWheelConfigFlag(number, number)
Declaration
public getWheelConfigFlag(wheelIndex: number, flag: number): boolean
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
number |
flag |
|
Returns
|
Improve this Doc
View Source
setWheelConfigFlag(number, number, boolean)
Declaration
public setWheelConfigFlag(wheelIndex: number, flag: number, value: boolean): void
Parameters
Type |
Name |
Description |
number |
wheelIndex |
|
number |
flag |
|
boolean |
value |
|
|
Improve this Doc
View Source
setupTransmission()
Declaration
public setupTransmission(): void
|
Improve this Doc
View Source
resetDashboardLights()
Declaration
public resetDashboardLights(): void
|
Improve this Doc
View Source
Declaration
public setMeta<K extends string>(key: K, value: InterfaceValueByKey<ICustomVehicleMeta, K, unknown, void>): void
Parameters
Type |
Name |
Description |
K |
key |
|
InterfaceValueByKey<ICustomVehicleMeta, K, unknown, void> |
value |
|
|
Improve this Doc
View Source
Declaration
public setMeta<K extends never>(key: K, value: ICustomVehicleMeta[K]): void
Parameters
|
Improve this Doc
View Source
Declaration
public setMeta<V extends unknown, K extends string>(key: K, value: InterfaceValueByKey<ICustomVehicleMeta, K, V, void>): void
Parameters
|
Improve this Doc
View Source
Declaration
public setMeta(values: MetaValues<ICustomVehicleMeta>): void
Parameters
|
Improve this Doc
View Source
Declaration
public deleteMeta(key: string): void
Parameters
Type |
Name |
Description |
string |
key |
|
|
Improve this Doc
View Source
Declaration
public deleteMeta<K extends never>(key: K): void
Parameters
Type |
Name |
Description |
K |
key |
|
|
Improve this Doc
View Source
Declaration
public getMeta<K extends string>(key: Exclude<K, never>): unknown
Parameters
Type |
Name |
Description |
Exclude<K, never> |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getMeta<K extends never>(key: K): undefined | ICustomVehicleMeta[K]
Parameters
Type |
Name |
Description |
K |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getMeta<V extends unknown>(key: string): undefined | V
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
Type |
Description |
undefined | V |
|
|
Improve this Doc
View Source
Declaration
public hasMeta(key: string): boolean
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public hasMeta<K extends never>(key: K): boolean
Parameters
Type |
Name |
Description |
K |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getSyncedMeta<K extends string>(key: Exclude<K, never>): unknown
Parameters
Type |
Name |
Description |
Exclude<K, never> |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getSyncedMeta<K extends never>(key: K): undefined | ICustomVehicleSyncedMeta[K]
Parameters
Type |
Name |
Description |
K |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getSyncedMeta<V extends unknown>(key: string): undefined | V
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
Type |
Description |
undefined | V |
|
|
Improve this Doc
View Source
Declaration
public hasSyncedMeta(key: string): boolean
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public hasSyncedMeta<K extends never>(key: K): boolean
Parameters
Type |
Name |
Description |
K |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getStreamSyncedMeta<K extends string>(key: Exclude<K, never>): unknown
Parameters
Type |
Name |
Description |
Exclude<K, never> |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getStreamSyncedMeta<K extends never>(key: K): undefined | ICustomVehicleStreamSyncedMeta[K]
Parameters
Type |
Name |
Description |
K |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public getStreamSyncedMeta<V extends unknown>(key: string): undefined | V
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
Type |
Description |
undefined | V |
|
|
Improve this Doc
View Source
Declaration
public hasStreamSyncedMeta(key: string): boolean
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
|
Improve this Doc
View Source
Declaration
public hasStreamSyncedMeta<K extends never>(key: K): boolean
Parameters
Type |
Name |
Description |
K |
key |
|
Returns
|
Improve this Doc
View Source
getByID(number)
Declaration
public static getByID(id: number): null | Vehicle
Parameters
Type |
Name |
Description |
number |
id |
|
Returns
|
Improve this Doc
View Source
getByScriptID(number)
Declaration
public static getByScriptID(scriptID: number): null | Vehicle
Parameters
Type |
Name |
Description |
number |
scriptID |
|
Returns
|
Improve this Doc
View Source
getByRemoteID(number)
Declaration
public static getByRemoteID(id: number): null | Vehicle
Parameters
Type |
Name |
Description |
number |
id |
|
Returns