player.getSyncedMeta

Description

Used to store cross-resource accessible information. This functionality stores an object on a player that can only be set on server-side with setSyncedMeta.

This type of meta is accessible anywhere but can only be set on server-side.

Syntax

getSyncedMeta(key: string): void;

Real World Example

const result = alt.Player.local.getSyncedMeta('myData');
if (!result) {
    // Data does not exist
    return;
}

console.log(result);

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

results matching ""

    No results matching ""