REVO / API version 0.0.10
LocalVehicle
Created asynchronously when streamed in. Collections and lookups include only this resource’s vehicles.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LocalVehicle(
model,position,rotation):LocalVehicle
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
model |
string | number |
- |
position |
IVector3 |
- |
rotation |
number | IVector3 | IQuaternion |
Heading or XYZ Euler angles in radians, or a non-zero quaternion (normalized on creation). |
Returns
Section titled “Returns”LocalVehicle
Overrides
Section titled “Overrides”Vehicle.constructor
Properties
Section titled “Properties”| Property | Type | Details |
|---|---|---|
aircraftType |
AircraftType |
|
boatInWater |
boolean |
|
bodyHealth |
number |
|
brake |
number |
|
brokenDoors |
number |
Door bitmasks, using the game door indices. |
dimension |
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. |
dirtLevel |
number |
|
driveable |
boolean |
|
engineHealth |
number |
|
engineRunning |
boolean |
|
frontBumper |
IVehicleBumperState |
Returns a copy. Editing it does not change the vehicle. |
handbrake |
boolean |
|
hasLandingGear |
boolean |
|
heading |
number |
Heading in radians. |
health |
number |
|
highBeamsOn |
boolean |
|
hornActive |
boolean |
|
id |
number |
Local ID, assigned independently on the client and server. |
isLocallySimulated |
boolean |
Simulation authority does not grant permission to change server-owned state. |
isNetworked |
false |
|
isStreamedIn |
boolean |
|
landingGearState |
LandingGearState |
|
lightsOn |
boolean |
|
livery |
number |
Index in [0, 255]. Variations unavailable for this model are ignored. |
looselyLatchedDoors |
number |
|
mainRotorStopped |
boolean |
|
maxHealth |
number |
|
netOwner |
Player | null |
|
networkId |
null |
Server-assigned network ID, or null without replication. Separate from id. |
petrolTankHealth |
number |
|
physicsAsleep |
boolean |
|
ready |
boolean |
The initial server state has been applied, or a client-only entity has streamed in. |
rearBumper |
IVehicleBumperState |
|
scorched |
boolean |
|
scriptID |
number |
GTA handle, or 0 while not streamed in. Do not retain it across frames. |
steeringAngle |
number |
Steering angle in radians. |
streamDistance |
number | null |
Per-object distance in metres. null uses the streamer’s default. |
streamingEnabled |
boolean |
Enables automatic streaming. Disabling it preserves the current streaming state. A dimension mismatch still suspends it until its dimension is visible again. |
throttle |
number |
|
type |
BaseType |
|
valid |
boolean |
|
all |
readonly LocalVehicle[] |
|
count |
number |
Accessors
Section titled “Accessors”| Accessor | Type | Details |
|---|---|---|
angVelocity |
Read: Vector3Write: IVector3 |
Angular velocity in radians per second. |
modelHash |
Read: numberWrite: string | number |
Accepts a model name or nonzero hash of the same entity type. Returns the old hash until the new model is applied. |
pos |
Read: Vector3Write: IVector3 |
|
quaternion |
Read: QuaternionWrite: IQuaternion |
|
radioStation |
Read: number | nullWrite: number |
Station hash. 0 means off, null means unavailable. |
rot |
Read: Vector3Write: IVector3 |
Euler angles in radians, applied X, then Y, then Z. |
velocity |
Read: Vector3Write: IVector3 |
Methods
Section titled “Methods”activatePhysics()
Section titled “activatePhysics()”activatePhysics():
void
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”destroy()
Section titled “destroy()”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.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”getSyncedMeta()
Section titled “getSyncedMeta()”Call Signature
Section titled “Call Signature”getSyncedMeta<
K>(key):ICustomBaseSyncedMeta[K] |undefined
Returns a copy. Client-only objects have no synced metadata.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
K extends never |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key |
K |
Returns
Section titled “Returns”ICustomBaseSyncedMeta[K] | undefined
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”getSyncedMeta<
T>(key):T|undefined
Returns a copy. Client-only objects have no synced metadata.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
TransportValue |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key |
string |
Returns
Section titled “Returns”T | undefined
Inherited from
Section titled “Inherited from”getSyncedMetaKeys()
Section titled “getSyncedMetaKeys()”getSyncedMetaKeys():
string[]
Returns
Section titled “Returns”string[]
Inherited from
Section titled “Inherited from”hasSyncedMeta()
Section titled “hasSyncedMeta()”hasSyncedMeta(
key):boolean
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key |
string |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”repair()
Section titled “repair()”repair():
void
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setDrivingControls()
Section titled “setDrivingControls()”setDrivingControls(
throttle,brake,handbrake):void
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
throttle |
number |
Range [-1, 1]. |
brake |
number |
Range [0, 1]. |
handbrake |
boolean |
- |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setLights()
Section titled “setLights()”setLights(
lights,highBeams):void
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
lights |
boolean |
highBeams |
boolean |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”sleepPhysics()
Section titled “sleepPhysics()”sleepPhysics():
void
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”getById()
Section titled “getById()”
staticgetById(id):LocalVehicle|null
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id |
number |
Returns
Section titled “Returns”LocalVehicle | null
Overrides
Section titled “Overrides”getByNetworkId()
Section titled “getByNetworkId()”
staticgetByNetworkId(networkId):null
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
networkId |
number |
Returns
Section titled “Returns”null
Overrides
Section titled “Overrides”getByScriptId()
Section titled “getByScriptId()”
staticgetByScriptId(scriptID):LocalVehicle|null
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
scriptID |
number |
Returns
Section titled “Returns”LocalVehicle | null