Entity::getOwnVariable

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

Server-Side
Function

Js.png JavaScript



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

JavaScript Syntax
Jslogo.png

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