OnPlayerClick: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server event}}
{{Server event}}
This event is triggered when a player clicks on an element.
This event is triggered when a player clicks using the mouse cursor.


==Parameters==
==Parameters==
Line 17: Line 17:
*'''screenPosY''': The Y position on the screen the player clicked on
*'''screenPosY''': The Y position on the screen the player clicked on


<!-- Add the event's source in the section below -->
==Source==
==Source==
The [[event system#Event source|source]] of this event is the [[player]] that clicked.
The [[event system#Event source|source]] of this event is the [[player]] that clicked.

Revision as of 23:41, 4 January 2008

This event is triggered when a player clicks using the mouse cursor.

Parameters

string mouseButton, string buttonState, element clickedElement, float worldPosX, float worldPosY, float worldPosZ, float screenPosX, float screenPosY
  • mouseButton: A string representing the mousebutton that was pressed. Value can be left, middle or right.
  • buttonState: A string representing the button state. Value can be up or down.
  • clickedElement: The element the player clicked on. This value is nil if none.
  • worldPosX: The X position in the world the player clicked on
  • worldPosY: The Y position in the world the player clicked on
  • worldPosZ: The Z position in the world the player clicked on
  • screenPosX: The X position on the screen the player clicked on
  • screenPosY: The Y position on the screen the player clicked on

Source

The source of this event is the player that clicked.

Example

This example does...

--This line does...
blah()
--This line does this...
mooo

See Also