OnClientElementDataChange

From Multi Theft Auto: Wiki
Revision as of 13:06, 22 October 2007 by Talidan (talk | contribs)
Jump to navigation Jump to search

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

Syntax

void onClientElementDataChange ( string name )

Example

This example tells the client whenever a HOT AIR "class" element data is changed.

addEventHandler ( "onClientElementDataChange", getRootElement(),
function ( dataName )
	if getElementType ( source ) == "player" and dataName == "class" then
		outputChatBox ( getPlayerName(source).." changed his class to "..getElementData ( source, "class" )
	end
end )