Entity::getOwnVariable

From RAGE Multiplayer Wiki
Revision as of 18:41, 29 May 2024 by Shr0x (talk | contribs)

Server-Side
Function

 JavaScript



JavaScript Syntax


Gets the value of the key set with player.setOwnVariable(key, value).

Required Params

  • *key: String

Syntax

player.getOwnVariable(key);

Example

This will set the job id for this player, which will only be available to him.

Server-Side
player.setOwnVariable("jobId", 9);


So we get the value that we set earlier.

Server-Side
player.getOwnVariable("jobId"); // 9


See More