player.getMeta

Description

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

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

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

Real World Example

const result = alt.Player.local.getMeta('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 ""