Skip to content
On this page

Athena.vehicle.get

Functions

ownedVehicleByDatabaseID

Usage

Athena.vehicle.get.ownedVehicleByDatabaseID(id): Promise<player>

Returns an owned vehicle by Database ID.

Export

Parameters

NameType
idstring | number

Returns

Promise<player>

Defined in

server/vehicle/get.ts:96


ownedVehicleByDocumentID

Usage

Athena.vehicle.get.ownedVehicleByDocumentID(_id): Promise<player>

Returns an owned vehicle by Document ID.

Export

Parameters

NameType
_idstring

Returns

Promise<player>

Defined in

server/vehicle/get.ts:85


ownedVehiclesByPlayer

Usage

Athena.vehicle.get.ownedVehiclesByPlayer<T>(playerOrDocumentID): Promise<T[]>

Returns a list of vehicle documents owned by the player.

Export

Type parameters

NameType
TOwnedVehicle

Parameters

NameType
playerOrDocumentIDany

Returns

Promise<T[]>

Defined in

server/vehicle/get.ts:185


spawnedVehicleByDatabaseID

Usage

Athena.vehicle.get.spawnedVehicleByDatabaseID(id): alt.Vehicle | undefined

Returns a spawned vehicle by their database identifier.

Not to be confused with _id.

Export

Parameters

NameType
idstring | number

Returns

alt.Vehicle | undefined

Defined in

server/vehicle/get.ts:28


spawnedVehicleByDocumentID

Usage

Athena.vehicle.get.spawnedVehicleByDocumentID(_id): alt.Vehicle | undefined

Returns a spawned vehicle by their unique database _id.

Export

Parameters

NameType
_idstring

Returns

alt.Vehicle | undefined

Defined in

server/vehicle/get.ts:61


spawnedVehicleByEntityID

Usage

Athena.vehicle.get.spawnedVehicleByEntityID(id): any

Used the internal alt:V Identifiers to find a vehicle.

These IDs always change, and are never the same.

Export

Parameters

NameType
idnumber

Returns

any

Defined in

server/vehicle/get.ts:15


temporaryVehicles

Usage

Athena.vehicle.get.temporaryVehicles(): alt.Vehicle[]

Get all temporary vehicles.

Example

ts
const vehicles = Athena.vehicle.get.temporaryVehicles();

Returns

alt.Vehicle[]

An array of temporary vehicles.

Defined in

server/vehicle/get.ts:120


vehiclesSpawnedByPlayer

Usage

Athena.vehicle.get.vehiclesSpawnedByPlayer(playerOrDocumentID): any

Takes a player instance, or _id and returns all spawned & owned vehicles

Example

ts
function something(player: alt.Player) {
    const vehicles = Athena.vehicle.get.vehiclesSpawnedByPlayer(player);
}

Parameters

NameType
playerOrDocumentIDany

Returns

any

An array of vehicles owned and spawned by a player.

Defined in

server/vehicle/get.ts:157


vehiclesWithOwnership

Usage

Athena.vehicle.get.vehiclesWithOwnership(): alt.Vehicle[]

Get all owned vehicles.

Example

ts
const vehicles = Athena.vehicle.get.vehiclesWithOwnership();

Returns

alt.Vehicle[]

An array of owned vehicles.

Defined in

server/vehicle/get.ts:137

Created by Stuyk | Est. 2020