Skip to content

REVO / API version 0.0.10

Vehicle

Collections include LocalVehicle instances.

Property Type Details
aircraftType
readonly
AircraftType —
boatInWater
readonly
boolean —
bodyHealth
readonly
number —
brake
readonly
number —
brokenDoors
readonly
number Door bitmasks, using the game door indices.
dimension
readonly
number World ID, default 0. Writable on local objects created by this resource. The server controls other objects. globalDimension makes the object visible in every numbered world.

Inherited from Physical.dimension
dirtLevel
readonly
number —
driveable
readonly
boolean —
engineHealth
readonly
number —
engineRunning boolean —
frontBumper
readonly
IVehicleBumperState Returns a copy. Editing it does not change the vehicle.
handbrake
readonly
boolean —
hasLandingGear
readonly
boolean —
heading number Heading in radians.

Inherited from Physical.heading
health number Inherited from Physical.health
highBeamsOn
readonly
boolean —
hornActive
readonly
boolean —
id
readonly
number Local ID, assigned independently on the client and server.

Inherited from Physical.id
isLocallySimulated
readonly
boolean Simulation authority does not grant permission to change server-owned state.

Inherited from Physical.isLocallySimulated
isNetworked
readonly
boolean Inherited from Physical.isNetworked
isStreamedIn
readonly
boolean Inherited from Physical.isStreamedIn
landingGearState
readonly
LandingGearState —
lightsOn
readonly
boolean —
livery number Index in [0, 255]. Variations unavailable for this model are ignored.
looselyLatchedDoors
readonly
number —
mainRotorStopped
readonly
boolean —
maxHealth number Inherited from Physical.maxHealth
netOwner
readonly
Player | null Inherited from Physical.netOwner
networkId
readonly
number | null Server-assigned network ID, or null without replication. Separate from id.

Inherited from Physical.networkId
petrolTankHealth
readonly
number —
physicsAsleep
readonly
boolean —
ready
readonly
boolean The initial server state has been applied, or a client-only entity has streamed in.

Inherited from Physical.ready
rearBumper
readonly
IVehicleBumperState —
scorched
readonly
boolean —
scriptID
readonly
number GTA handle, or 0 while not streamed in. Do not retain it across frames.

Inherited from Physical.scriptID
steeringAngle number Steering angle in radians.
streamDistance number | null Per-object distance in metres. null uses the streamer’s default.

Inherited from Physical.streamDistance
streamingEnabled boolean Enables automatic streaming. Disabling it preserves the current streaming state. A dimension mismatch still suspends it until its dimension is visible again.

Inherited from Physical.streamingEnabled
throttle
readonly
number —
type
readonly
BaseType Inherited from Physical.type
valid
readonly
boolean Inherited from Physical.valid
all
static readonly
readonly Vehicle[] Overrides Physical.all
count
static readonly
number Overrides Physical.count
Accessor Type Details
angVelocity Read: Vector3
Write: IVector3
Angular velocity in radians per second.

Inherited from Physical.angVelocity
modelHash
readonly
number Inherited from Physical.modelHash
pos Read: Vector3
Write: IVector3
Inherited from Physical.pos
quaternion Read: Quaternion
Write: IQuaternion
Inherited from Physical.quaternion
radioStation Read: number | null
Write: number
Station hash. 0 means off, null means unavailable.
rot Read: Vector3
Write: IVector3
Euler angles in radians, applied X, then Y, then Z.

Inherited from Physical.rot
velocity Read: Vector3
Write: IVector3
Inherited from Physical.velocity

activatePhysics(): void

void

Physical.activatePhysics


destroy(): void

Deletes an entity created by this resource. Throws if the entity is networked, belongs to another resource, has been destroyed, or cannot be removed from GTA.

void

Physical.destroy


getSyncedMeta<K>(key): ICustomBaseSyncedMeta[K] | undefined

Returns a copy. Client-only objects have no synced metadata.

Type Parameter
K extends never
Parameter Type
key K

ICustomBaseSyncedMeta[K] | undefined

Physical.getSyncedMeta

getSyncedMeta<T>(key): T | undefined

Returns a copy. Client-only objects have no synced metadata.

Type Parameter Default type
T TransportValue
Parameter Type
key string

T | undefined

Physical.getSyncedMeta


getSyncedMetaKeys(): string[]

string[]

Physical.getSyncedMetaKeys


hasSyncedMeta(key): boolean

Parameter Type
key string

boolean

Physical.hasSyncedMeta


repair(): void

void


setDrivingControls(throttle, brake, handbrake): void

Parameter Type Description
throttle number Range [-1, 1].
brake number Range [0, 1].
handbrake boolean -

void


setLights(lights, highBeams): void

Parameter Type
lights boolean
highBeams boolean

void


sleepPhysics(): void

void


static getById(id): Vehicle | null

Parameter Type
id number

Vehicle | null

Physical.getById


static getByNetworkId(networkId): Vehicle | null

Parameter Type
networkId number

Vehicle | null

Physical.getByNetworkId


static getByScriptId(scriptID): Vehicle | null

Parameter Type
scriptID number

Vehicle | null

Physical.getByScriptId

Creating and configuring vehicles