Athena.getters.players ​
Functions ​
asCharacters ​
Usage
Athena.getters.players.asCharacters<T
>(): any
Get all online players as characters.
Export
Type parameters ​
Name | Type |
---|---|
T | Character |
Returns ​
any
Defined in ​
driving ​
Usage
Athena.getters.players.driving(): alt.Player
[]
Returns all players who are currently driving a vehicle.
Returns ​
alt.Player
[]
Defined in ​
drivingSpecificModel ​
Usage
Athena.getters.players.drivingSpecificModel(model
): alt.Player
[]
Return all online players driving a specific vehicle model.
Parameters ​
Name | Type |
---|---|
model | string | number |
Returns ​
alt.Player
[]
Defined in ​
inRange ​
Usage
Athena.getters.players.inRange(pos
, range
): alt.Player
[]
Gets all players around a specific position.
Parameters ​
Name | Type | Description |
---|---|---|
pos | IVector3 | A position in the world. |
range | number |
Returns ​
alt.Player
[]
Defined in ​
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 ​
Name | Type | Description |
---|---|---|
pos | IVector3 | A position in the world. |
range | number |
Returns ​
{ dist
: number
; player
: alt.Player
}[]
Defined in ​
inVehicle ​
Usage
Athena.getters.players.inVehicle(vehicle
): alt.Player
[]
Returns all passengers and the driver. No specific order.
Parameters ​
Name | Type | Description |
---|---|---|
vehicle | Vehicle | An alt:V Vehicle Entity |
Returns ​
alt.Player
[]
Defined in ​
online ​
Usage
Athena.getters.players.online(): alt.Player
[]
Return all players currently online and logged into a character.
Returns ​
alt.Player
[]
Defined in ​
onlineWithWeapons ​
Usage
Athena.getters.players.onlineWithWeapons(): alt.Player
[]
Return all players with weapons out.
Export
Returns ​
alt.Player
[]
Defined in ​
walking ​
Usage
Athena.getters.players.walking(): alt.Player
[]
Return all players who are currently walking / on foot.
Returns ​
alt.Player
[]
Defined in ​
withName ​
Usage
Athena.getters.players.withName(name
): alt.Player
[]
Gets all online players with a given name.
Parameters ​
Name | Type |
---|---|
name | string |
Returns ​
alt.Player
[]