Entity::getVariable: Difference between revisions
mNo edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{SharedFunctionJS}} | |||
Retrieves the custom data from the entity. | Retrieves the custom data from the entity. | ||
{{JSContainer| | |||
==Syntax== | ==Syntax== | ||
<pre> | <pre> | ||
| Line 9: | Line 13: | ||
==Example== | ==Example== | ||
This example will retrieve the data from the variable 'veh' that is assigned to the player | This example will retrieve the data from the variable 'veh' that is assigned to the player | ||
{{SharedCode| | |||
<pre> | <pre> | ||
let veh = player.getVariable('veh'); | let veh = player.getVariable('veh'); | ||
</pre> | </pre> | ||
</div> | </div> | ||
}} | |||
}} | |||
== See More == | == See More == | ||
Revision as of 12:33, 2 December 2019
Retrieves the custom data from the entity.
JavaScript Syntax
Syntax
entity.getVariable('variableName');
Example
This example will retrieve the data from the variable 'veh' that is assigned to the player
Shared
let veh = player.getVariable('veh');