OnClientElementDataChange: Difference between revisions
Jump to navigation
Jump to search
m (See Also for client element events) |
|||
Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
string dataName | string dataName, string oldValue | ||
</syntaxhighlight> | </syntaxhighlight> | ||
*'''dataName''': A string representing the element data that was changed | *'''dataName''': A string representing the element data that was changed | ||
*'''oldValue''': A string representing the value before changed element data | |||
==Source== | ==Source== |
Revision as of 02:00, 19 November 2009
This event is triggered whenever an element's element data is changed.
Parameters
string dataName, string oldValue
- dataName: A string representing the element data that was changed
- oldValue: A string representing the value before changed element data
Source
The source of this event is the element that had its element data changed
Example
This example tells the client whenever a player's "score" element data is changed.
addEventHandler ( "onClientElementDataChange", getRootElement(), function ( dataName ) if getElementType ( source ) == "player" and dataName == "score" then outputChatBox ( getPlayerName(source).."'s new score is "..getElementData (source, "score").."!" ) end end )
See Also
Client element events
- onClientElementColShapeHit
- onClientElementColShapeLeave
- onClientElementDataChange
- onClientElementDestroy
- onClientElementDimensionChange
- onClientElementInteriorChange
- onClientElementModelChange
- onClientElementStreamIn
- onClientElementStreamOut
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled