Athena.systems.character ​
Functions ​
create ​
Usage
Athena.systems.character.create(player
, appearance
, info
, name
): Promise
<boolean
>
Create a new character for a specific player.
Parameters ​
Name | Type | Description |
---|---|---|
player | Player | An alt:V Player Entity |
appearance | Appearance | |
info | CharacterInfo | |
name | string |
Returns ​
Promise
<boolean
>
Defined in ​
server/systems/character.ts:61
getCharacters ​
Usage
Athena.systems.character.getCharacters(account_id
): Promise
<player
[]>
Get all characters that belong to an account by account identifier.
Parameters ​
Name | Type |
---|---|
account_id | string |
Returns ​
Promise
<player
[]>
Defined in ​
server/systems/character.ts:223
invokeCreator ​
Usage
Athena.systems.character.invokeCreator(player
, ...args
): any
Invokes the custom creator to be opened.
Parameters ​
Name | Type | Description |
---|---|---|
player | Player | An alt:V Player Entity |
...args | any [] |
Returns ​
any
Defined in ​
server/systems/character.ts:38
isNameTaken ​
Usage
Athena.systems.character.isNameTaken(name
): Promise
<boolean
>
Check if a character name is taken.
Parameters ​
Name | Type |
---|---|
name | string |
Returns ​
Promise
<boolean
>
Defined in ​
server/systems/character.ts:208
override ​
Usage
Athena.systems.character.override(functionName
, callback
): any
Used to override character creation / management internally.
Parameters ​
Name | Type |
---|---|
functionName | "create" |
callback | (player : Player , appearance : Appearance , info : CharacterInfo , name : string ) => Promise <boolean > |
Returns ​
any
Defined in ​
server/systems/character.ts:273
Usage
Athena.systems.character.override(functionName
, callback
): any
Used to override character creation / management internally.
Parameters ​
Name | Type |
---|---|
functionName | "setCreatorCallback" |
callback | (callback : (player : Player , ...args : any []) => void ) => any |
Returns ​
any
Defined in ​
server/systems/character.ts:274
Usage
Athena.systems.character.override(functionName
, callback
): any
Used to override character creation / management internally.
Parameters ​
Name | Type |
---|---|
functionName | "invokeCreator" |
callback | (player : Player , ...args : any []) => any |
Returns ​
any
Defined in ​
server/systems/character.ts:275
Usage
Athena.systems.character.override(functionName
, callback
): any
Used to override character creation / management internally.
Parameters ​
Name | Type |
---|---|
functionName | "select" |
callback | (player : Player , character : Character ) => any |
Returns ​
any
Defined in ​
server/systems/character.ts:276
Usage
Athena.systems.character.override(functionName
, callback
): any
Used to override character creation / management internally.
Parameters ​
Name | Type |
---|---|
functionName | "isNameTaken" |
callback | (name : string ) => Promise <boolean > |
Returns ​
any
Defined in ​
server/systems/character.ts:277
Usage
Athena.systems.character.override(functionName
, callback
): any
Used to override character creation / management internally.
Parameters ​
Name | Type |
---|---|
functionName | "getCharacters" |
callback | (account_id : string ) => Promise <player []> |
Returns ​
any
Defined in ​
server/systems/character.ts:278
select ​
Usage
Athena.systems.character.select(player
, character
): any
The final step in the character selection system.
After this step the player is spawned and synchronized.
Always call this function last in login flow modifications.
Parameters ​
Name | Type | Description |
---|---|---|
player | Player | An alt:V Player Entity |
character | Character |
Returns ​
any
Defined in ​
server/systems/character.ts:105
setCreatorCallback ​
Usage
Athena.systems.character.setCreatorCallback(callback
): any
Allows a custom character creator to be shown.
Parameters ​
Name | Type |
---|---|
callback | (player : Player , ...args : any []) => void |
Returns ​
any