Athena.vehicle.controls ​
Functions ​
isLocked ​
Usage
Athena.vehicle.controls.isLocked(vehicle
): boolean
Returns true if the vehicle is currently locked.
Parameters ​
Name | Type | Description |
---|---|---|
vehicle | Vehicle | An alt:V Vehicle Entity |
Returns ​
boolean
Defined in ​
override ​
Usage
Athena.vehicle.controls.override(functionName
, callback
): any
Used to override vehicle control functionality
Parameters ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type | Description |
---|---|---|
vehicle | Vehicle | An alt:V Vehicle Entity |
door | 0 | 3 | 2 | 1 | 4 | 5 |
Returns ​
Promise
<boolean
>
The new state of the door. true = open
Defined in ​
toggleEngine ​
Usage
Athena.vehicle.controls.toggleEngine(vehicle
): Promise
<boolean
>
Toggles a vehicle engine.
Parameters ​
Name | Type | Description |
---|---|---|
vehicle | Vehicle | An alt:V Vehicle Entity |
Returns ​
Promise
<boolean
>
The new state of the engine. true = on
Defined in ​
toggleLock ​
Usage
Athena.vehicle.controls.toggleLock(vehicle
): Promise
<boolean
>
Toggles a vehicle door lock.
Parameters ​
Name | Type | Description |
---|---|---|
vehicle | Vehicle | An alt:V Vehicle Entity |
Returns ​
Promise
<boolean
>
The new state of the lock. true = locked
Defined in ​
update ​
Usage
Athena.vehicle.controls.update(vehicle
): any
Update the given vehicle in the database.
Parameters ​
Name | Type | Description |
---|---|---|
vehicle | Vehicle | An 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 ​
Name | Type | Description |
---|---|---|
vehicle | Vehicle | An alt:V Vehicle Entity |
Returns ​
Promise
<void
>