player.setMeta

Description

Used to store cross-resource accessible information. This functionality stores an object on a player that can than be accessed with getMeta

This type of meta is only accessible where it is created.

If it is created on the client-side it is only accessible on the client-side.

If it's created on the server-side it is only accessible on the server-side.

Syntax

setMeta(key: string, value: any): void;

You can store literally anything. Except functions.

Real World Example

player.setMeta('myData', 'hello from meta');

alt.Player.local can also be a player instance from server

results matching ""

    No results matching ""