Athena.vehicle.spawn ​
Functions ​
all ​
Usage
Athena.vehicle.spawn.all(): any
Spawn all vehicles from the database.
Returns ​
any
Defined in ​
override ​
Usage
Athena.vehicle.spawn.override(functionName
, callback
): any
Used to override vehicle spawning functionality
Parameters ​
Name | Type |
---|---|
functionName | "all" |
callback | () => any |
Returns ​
any
Defined in ​
Usage
Athena.vehicle.spawn.override(functionName
, callback
): any
Used to override vehicle spawning functionality
Parameters ​
Name | Type |
---|---|
functionName | "temporary" |
callback | (vehicleInfo : VehicleSpawnInfo , deleteOnLeave : boolean ) => alt.Vehicle |
Returns ​
any
Defined in ​
Usage
Athena.vehicle.spawn.override(functionName
, callback
): any
Used to override vehicle spawning functionality
Parameters ​
Name | Type |
---|---|
functionName | "temporaryOwned" |
callback | (player : Player , vehicleInfo : VehicleSpawnInfo , deleteOnLeave : boolean ) => alt.Vehicle |
Returns ​
any
Defined in ​
Usage
Athena.vehicle.spawn.override(functionName
, callback
): any
Used to override vehicle spawning functionality
Parameters ​
Name | Type |
---|---|
functionName | "persistent" |
callback | (document : OwnedVehicle ) => alt.Vehicle | undefined |
Returns ​
any
Defined in ​
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 ​
Name | Type |
---|---|
document | OwnedVehicle |
Returns ​
alt.Vehicle
| undefined
Defined in ​
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 ​
Name | Type | Default value |
---|---|---|
vehicleInfo | VehicleSpawnInfo | undefined |
deleteOnLeave | boolean | false |
Returns ​
alt.Vehicle
Defined in ​
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 ​
Name | Type | Default value | Description |
---|---|---|---|
player | Player | undefined | An alt:V Player Entity |
vehicleInfo | VehicleSpawnInfo | undefined | |
deleteOnLeave | boolean | false |
Returns ​
alt.Vehicle