Skip to content
On this page

Athena.vehicle.spawn

Functions

all

Usage

Athena.vehicle.spawn.all(): any

Spawn all vehicles from the database.

Returns

any

Defined in

server/vehicle/spawn.ts:115


override

Usage

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

Used to override vehicle spawning functionality

Parameters

NameType
functionName"all"
callback() => any

Returns

any

Defined in

server/vehicle/spawn.ts:139

Usage

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

Used to override vehicle spawning functionality

Parameters

NameType
functionName"temporary"
callback(vehicleInfo: VehicleSpawnInfo, deleteOnLeave: boolean) => alt.Vehicle

Returns

any

Defined in

server/vehicle/spawn.ts:140

Usage

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

Used to override vehicle spawning functionality

Parameters

NameType
functionName"temporaryOwned"
callback(player: Player, vehicleInfo: VehicleSpawnInfo, deleteOnLeave: boolean) => alt.Vehicle

Returns

any

Defined in

server/vehicle/spawn.ts:141

Usage

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

Used to override vehicle spawning functionality

Parameters

NameType
functionName"persistent"
callback(document: OwnedVehicle) => alt.Vehicle | undefined

Returns

any

Defined in

server/vehicle/spawn.ts:142


persistent

Usage

Athena.vehicle.spawn.persistent(document): alt.Vehicle | undefined

Spawn a saved vehicle that belongs to a player. Returns undefined if the vehicle is already spawned.

Parameters

NameType
documentOwnedVehicle

Returns

alt.Vehicle | undefined

Defined in

server/vehicle/spawn.ts:67


temporary

Usage

Athena.vehicle.spawn.temporary(vehicleInfo, deleteOnLeave?): alt.Vehicle

Spawn a temporary vehicle; it cannot be saved. It is not owned by anyone.

Parameters

NameTypeDefault value
vehicleInfoVehicleSpawnInfoundefined
deleteOnLeavebooleanfalse

Returns

alt.Vehicle

Defined in

server/vehicle/spawn.ts:15


temporaryOwned

Usage

Athena.vehicle.spawn.temporaryOwned(player, vehicleInfo, deleteOnLeave?): alt.Vehicle

Spawn a temporary vehicle; owned by the player. Cannot be modified by the player.

Parameters

NameTypeDefault valueDescription
playerPlayerundefinedAn alt:V Player Entity
vehicleInfoVehicleSpawnInfoundefined
deleteOnLeavebooleanfalse

Returns

alt.Vehicle

Defined in

server/vehicle/spawn.ts:42

Created by Stuyk | Est. 2020