Entity::getOwnVariable: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__TOC__
__TOC__
{{ServersideJsFunction}}
{{ServersideJsFunction}}
{{JSContainer|


Allows to get the value set with [[Entity::setOwnVariable|entity.setOwnVariable(key, value)]].
Gets the value of the key set with [[Entity::setOwnVariable|player.setOwnVariable(key, value)]].


Позволяет получить значение установленное с помощью  [[Entity::setOwnVariable|entity.setOwnVariable(key, value)]].
=== Required Params===
*{{Required}}'''key''': {{RageType|String}}


{{JSContainer|
==Syntax==
==Syntax==
<pre>
<pre>
entity.getOwnVariable(key);
player.getOwnVariable(key);
</pre>
</pre>
=== Required Arguments ===
*{{Required}}'''entity''': {{RageType|Object}}
*{{Required}}'''key''': {{RageType|String}}


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


Это установит id работы для данного игрока, которое будет доступно только у него.
{{ServersideCode|
{{ServersideCode|
<pre>
<pre>
Line 30: Line 25:
So we get the value that we set earlier.
So we get the value that we set earlier.


Так мы получим значение, что установили ранее.
{{ServersideCode|
{{ServersideCode|
<pre>
<pre>
Line 39: Line 33:


== See More ==
== See More ==
{{Player_function}}
{{Entity_functions}}
{{Entity_functions}}


[[Category:Entity API]]
[[Category:Entity API]]
[[Category:Server-side Function]]
[[Category:Server-side Function]]

Latest revision as of 18:50, 29 May 2024