SetElementData

From Multi Theft Auto: Wiki
Revision as of 12:32, 16 August 2007 by Arc (talk | contribs)
Jump to navigation Jump to search

This function stores data attached to an element. This data can be any primitive LUA type or MTA element (but not a text item or display).

Element data is a useful way to store data attached to players.

Syntax

bool setElementData ( element theElement, string key, var value ) 

Required Arguments

  • theElement: The element you wish to attach the data to
  • key: The key you wish to store the data under
  • value: The value you wish to store

Returns

Returns true if the data was set succesfully, false otherwise.

Example

Click to expand [+]
Server

See Also