Skip to content
On this page

Athena.config.playerConfig

Variables

default

default: Object

Type declaration

NameType
set<CustomKeys>(player: Player, key: any, value: any) => void

Defined in

server/config/playerConfig.ts:25

Functions

set

Usage

Athena.config.playerConfig.set<CustomKeys>(player, key, value): void

Set a value to auto-sync to client. Provides type safety for setting predictable keys. Wraps up the player.setLocalMeta function.

Example

ts
export type ExtendedKeys = 'hello-world' | 'wanted-level' | 'bitcoins';

Athena.config.set<ExtendedKeys>('wanted-level', 5);

Type parameters

Name
CustomKeys

Parameters

NameTypeDescription
playerPlayerAn alt:V Player Entity
keyany
valueany

Returns

void

Defined in

server/config/playerConfig.ts:21

Created by Stuyk | Est. 2020