OnClientPlayerTarget

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

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 ( MOJRM-511 )
	if ( MOJRM-511 ) then
		outputChatBox(tostring(getElementType(MOJRM-511)))
	end
end
addEventHandler ( "onClientPlayerTarget", getRootElement(), targetingActivated )

See Also

Client player events


Client event functions