OnClientPlayerTarget: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
m (See Also for client player events)
Line 25: Line 25:


==See Also==
==See Also==
{{Event_functions}}
===Client player events===
{{Client_player_events}}
===Client event functions===
{{Client_event_functions}}

Revision as of 12:35, 12 January 2008

This event is triggered whenever the local player targets an element.

Parameters

element target
  • target: The element the player targetted.

Source

The source of this event is the player that targeted the element.

Example

This example outputs the type of the target the client is aiming at

function targetingActivated ( target )
	if ( target ) then
		outputChatBox(tostring(getElementType(source)))
	end
end
addEventHandler ( "onClientPlayerTarget", getRootElement(), targetingActivated )

See Also

Client player events


Client event functions