player.getMeta
Description
Used to store cross-resource accessible information. This functionality stores an object on a player that can than 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 = player.getMeta('myData');
if (!result) {
// Data does not exist
return;
}
console.log(result);