OnClientElementDataChange

From Multi Theft Auto: Wiki
Revision as of 14:49, 10 December 2007 by Arc (talk | contribs)
Jump to navigation Jump to search

This event is triggered whenever an element's element data is changed.

Parameters

string dataName
  • dataName: A string representing the element data that was changed

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 )