Skip to content
On this page

Athena.vehicle.tempVehicles

Functions

add

Usage

Athena.vehicle.tempVehicles.add(vehicle, options): any

Register a vehicle as temporary

Parameters

NameTypeDescription
vehicleVehicleAn alt:V Vehicle Entity
optionsObject
options.deleteOnLeave?boolean-
options.owner?number-

Returns

any

Defined in

server/vehicle/tempVehicles.ts:14


has

Usage

Athena.vehicle.tempVehicles.has(vehicle): boolean

Check if a vehicle is temporary by id, or vehicle instance.

Parameters

NameType
vehicleany

Returns

boolean

Defined in

server/vehicle/tempVehicles.ts:60


isOwner

Usage

Athena.vehicle.tempVehicles.isOwner(player, vehicle): boolean

Check if player is owner of a temporary vehicle.

Parameters

NameTypeDescription
playerPlayer
vehicleVehicleAn alt:V Vehicle Entity

Returns

boolean

Defined in

server/vehicle/tempVehicles.ts:77


override

Usage

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

Used to override temporary vehicle functionality

Parameters

NameType
functionName"add"
callback(vehicle: Vehicle, options: { deleteOnLeave?: boolean ; owner?: number }) => any

Returns

any

Defined in

server/vehicle/tempVehicles.ts:114

Usage

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

Used to override temporary vehicle functionality

Parameters

NameType
functionName"remove"
callback(id: number) => void

Returns

any

Defined in

server/vehicle/tempVehicles.ts:115

Usage

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

Used to override temporary vehicle functionality

Parameters

NameType
functionName"has"
callback(vehicle: any) => boolean

Returns

any

Defined in

server/vehicle/tempVehicles.ts:116

Usage

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

Used to override temporary vehicle functionality

Parameters

NameType
functionName"isOwner"
callback(player: Player, vehicle: Vehicle) => boolean

Returns

any

Defined in

server/vehicle/tempVehicles.ts:117

Usage

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

Used to override temporary vehicle functionality

Parameters

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

Returns

any

Defined in

server/vehicle/tempVehicles.ts:118


remove

Usage

Athena.vehicle.tempVehicles.remove(id): void

Removes a temporary vehicle from the tracker.

Parameters

NameType
idnumber

Returns

void

Defined in

server/vehicle/tempVehicles.ts:36


shouldBeDestroyed

Usage

Athena.vehicle.tempVehicles.shouldBeDestroyed(vehicle): boolean

Check if this vehicle should be removed when a player leaves the drivers seat.

Parameters

NameTypeDescription
vehicleVehicleAn alt:V Vehicle Entity

Returns

boolean

Defined in

server/vehicle/tempVehicles.ts:96

Created by Stuyk | Est. 2020