Skip to content
On this page

Athena.vehicle.controls

Functions

isLocked

Usage

Athena.vehicle.controls.isLocked(vehicle): boolean

Returns true if the vehicle is currently locked.

Parameters

NameTypeDescription
vehicleVehicleAn alt:V Vehicle Entity

Returns

boolean

Defined in

server/vehicle/controls.ts:87


override

Usage

Athena.vehicle.controls.override(functionName, callback): any

Used to override vehicle control functionality

Parameters

NameType
functionName"toggleLock"
callback(vehicle: Vehicle) => Promise<boolean>

Returns

any

Defined in

server/vehicle/controls.ts:171

Usage

Athena.vehicle.controls.override(functionName, callback): any

Used to override vehicle control functionality

Parameters

NameType
functionName"toggleDoor"
callback(vehicle: Vehicle, door: 0 | 3 | 2 | 1 | 4 | 5) => Promise<boolean>

Returns

any

Defined in

server/vehicle/controls.ts:172

Usage

Athena.vehicle.controls.override(functionName, callback): any

Used to override vehicle control functionality

Parameters

NameType
functionName"toggleEngine"
callback(vehicle: Vehicle) => Promise<boolean>

Returns

any

Defined in

server/vehicle/controls.ts:173

Usage

Athena.vehicle.controls.override(functionName, callback): any

Used to override vehicle control functionality

Parameters

NameType
functionName"update"
callback(vehicle: Vehicle) => any

Returns

any

Defined in

server/vehicle/controls.ts:174

Usage

Athena.vehicle.controls.override(functionName, callback): any

Used to override vehicle control functionality

Parameters

NameType
functionName"isLocked"
callback(vehicle: Vehicle) => boolean

Returns

any

Defined in

server/vehicle/controls.ts:175


toggleDoor

Usage

Athena.vehicle.controls.toggleDoor(vehicle, door): Promise<boolean>

Toggles a vehicle door.

Parameters

NameTypeDescription
vehicleVehicleAn alt:V Vehicle Entity
door0 | 3 | 2 | 1 | 4 | 5

Returns

Promise<boolean>

The new state of the door. true = open

Defined in

server/vehicle/controls.ts:66


toggleEngine

Usage

Athena.vehicle.controls.toggleEngine(vehicle): Promise<boolean>

Toggles a vehicle engine.

Parameters

NameTypeDescription
vehicleVehicleAn alt:V Vehicle Entity

Returns

Promise<boolean>

The new state of the engine. true = on

Defined in

server/vehicle/controls.ts:35


toggleLock

Usage

Athena.vehicle.controls.toggleLock(vehicle): Promise<boolean>

Toggles a vehicle door lock.

Parameters

NameTypeDescription
vehicleVehicleAn alt:V Vehicle Entity

Returns

Promise<boolean>

The new state of the lock. true = locked

Defined in

server/vehicle/controls.ts:13


update

Usage

Athena.vehicle.controls.update(vehicle): any

Update the given vehicle in the database.

Parameters

NameTypeDescription
vehicleVehicleAn alt:V Vehicle Entity

Returns

any

Defined in

server/vehicle/controls.ts:102


updateLastUsed

Usage

Athena.vehicle.controls.updateLastUsed(vehicle): Promise<void>

Update the vehicle's last used value.

Parameters

NameTypeDescription
vehicleVehicleAn alt:V Vehicle Entity

Returns

Promise<void>

Defined in

server/vehicle/controls.ts:152

Created by Stuyk | Est. 2020