Skip to content
On this page

Athena.getters.players

Functions

asCharacters

Usage

Athena.getters.players.asCharacters<T>(): any

Get all online players as characters.

Export

Type parameters

NameType
TCharacter

Returns

any

Defined in

server/getters/players.ts:209


driving

Usage

Athena.getters.players.driving(): alt.Player[]

Returns all players who are currently driving a vehicle.

Returns

alt.Player[]

Defined in

server/getters/players.ts:132


drivingSpecificModel

Usage

Athena.getters.players.drivingSpecificModel(model): alt.Player[]

Return all online players driving a specific vehicle model.

Parameters

NameType
modelstring | number

Returns

alt.Player[]

Defined in

server/getters/players.ts:164


inRange

Usage

Athena.getters.players.inRange(pos, range): alt.Player[]

Gets all players around a specific position.

Parameters

NameTypeDescription
posIVector3A position in the world.
rangenumber

Returns

alt.Player[]

Defined in

server/getters/players.ts:88


inRangeWithDistance

Usage

Athena.getters.players.inRangeWithDistance(pos, range): { dist: number ; player: alt.Player }[]

Creates an array of players who are closest to a position. Array is automatically sorted into ascending order.

Parameters

NameTypeDescription
posIVector3A position in the world.
rangenumber

Returns

{ dist: number ; player: alt.Player }[]

Defined in

server/getters/players.ts:55


inVehicle

Usage

Athena.getters.players.inVehicle(vehicle): alt.Player[]

Returns all passengers and the driver. No specific order.

Parameters

NameTypeDescription
vehicleVehicleAn alt:V Vehicle Entity

Returns

alt.Player[]

Defined in

server/getters/players.ts:198


online

Usage

Athena.getters.players.online(): alt.Player[]

Return all players currently online and logged into a character.

Returns

alt.Player[]

Defined in

server/getters/players.ts:11


onlineWithWeapons

Usage

Athena.getters.players.onlineWithWeapons(): alt.Player[]

Return all players with weapons out.

Export

Returns

alt.Player[]

Defined in

server/getters/players.ts:28


walking

Usage

Athena.getters.players.walking(): alt.Player[]

Return all players who are currently walking / on foot.

Returns

alt.Player[]

Defined in

server/getters/players.ts:147


withName

Usage

Athena.getters.players.withName(name): alt.Player[]

Gets all online players with a given name.

Parameters

NameType
namestring

Returns

alt.Player[]

Defined in

server/getters/players.ts:111

Created by Stuyk | Est. 2020