SetElementData: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:


==Syntax==  
==Syntax==  
<section name="Client" class="client" show="false">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
<section name="Client" class="client" show="false">
bool setElementData ( element theElement, string key, [bool synchronize] var value )
bool setElementData ( element theElement, string key, [bool synchronize] var value )
</syntaxhighlight>
<section name="Server" class="server" show="true">  
<section name="Server" class="server" show="true">  
<syntaxhighlight lang="lua">
bool setElementData ( element theElement, string key, var value )
bool setElementData ( element theElement, string key, var value )
</syntaxhighlight>  
</syntaxhighlight>  

Revision as of 17:30, 14 February 2008

This function stores element data under a certain key, attached to an element. Element data set using this is then synced with all clients or the server (depending if used client-side or not). As such you should avoid passing data that is not able to be synced into this function (i.e. xmlnodes, acls, aclgroups etc.) Server-created elements are able to be synced.

Syntax

Click to expand [+]
Client

See Also