getElementData
Shared
Reads a value stored on an element.
any|false getElementData(element element, string key)
Parameters
| Name | Type | Description |
|---|---|---|
| element | element | The element holding the data. |
| key | string | The data's key. Keys longer than 128 characters are cut, with a warning. |
Returns
The value stored under the key, or false if there is nothing there.
Example
local money = getElementData(localPlayer, "money") or 0
outputDebugString("You have $" .. money)Coming from MTAThere is no
inherit argument: only the element's own data is read.