Entity::getOwnVariable

From RAGE Multiplayer Wiki

Server-Side
Function

 JavaScript



Allows to get the value set with entity.setOwnVariable(key, value).

JavaScript Syntax

Syntax

entity.getOwnVariable(key);

Required Arguments

  • *entity: Object
  • *key: String

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