Skip to content
On this page

Athena.systems.identifier

Type Aliases

IdentifierStrategy

Ƭ IdentifierStrategy: "account_id" | "character_id" | "server_id"

Defined in

server/systems/identifier.ts:5

Functions

getIdByStrategy

Usage

Athena.systems.identifier.getIdByStrategy(player): number

Returns the current numerical identifier based on current strategy.

Parameters

NameTypeDescription
playerPlayerAn alt:V Player Entity

Returns

number

Defined in

server/systems/identifier.ts:108


getPlayer

Usage

Athena.systems.identifier.getPlayer(id): alt.Player

Returns the player by the currently set identification strategy.

Parameters

NameType
idstring | number

Returns

alt.Player

Defined in

server/systems/identifier.ts:62


override

Usage

Athena.systems.identifier.override(functionName, callback): any

Used to override identification strategy functions.

Parameters

NameType
functionName"setIdentificationStrategy"
callback(_strategy: IdentifierStrategy) => any

Returns

any

Defined in

server/systems/identifier.ts:145

Usage

Athena.systems.identifier.override(functionName, callback): any

Used to override identification strategy functions.

Parameters

NameType
functionName"setPlayerIdentifier"
callback(player: Player) => any

Returns

any

Defined in

server/systems/identifier.ts:146

Usage

Athena.systems.identifier.override(functionName, callback): any

Used to override identification strategy functions.

Parameters

NameType
functionName"getPlayer"
callback(id: string | number) => alt.Player

Returns

any

Defined in

server/systems/identifier.ts:147

Usage

Athena.systems.identifier.override(functionName, callback): any

Used to override identification strategy functions.

Parameters

NameType
functionName"getIdByStrategy"
callback(player: Player) => number

Returns

any

Defined in

server/systems/identifier.ts:148


setIdentificationStrategy

Usage

Athena.systems.identifier.setIdentificationStrategy(_strategy): any

Should be set during the server startup phase to change player identification strategies.

This will apply to all players when they select a character.

DO NOT CHANGE THIS AFTER SERVER STARTUP.

Parameters

NameType
_strategyIdentifierStrategy

Returns

any

Defined in

server/systems/identifier.ts:26


setPlayerIdentifier

Usage

Athena.systems.identifier.setPlayerIdentifier(player): any

Automatically sets the player identification by strategy to the synced meta.

Parameters

NameTypeDescription
playerPlayerAn alt:V Player Entity

Returns

any

Defined in

server/systems/identifier.ts:39

Created by Stuyk | Est. 2020