OnMarkerHit: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Tested and working, added example. Ransom)
Line 22: Line 22:
outputChatBox ( "hi" )
outputChatBox ( "hi" )
end
end
addEventHandler("onMarkerHit", root, MarkerHit)</syntaxhighlight>
addEventHandler("onMarkerHit", getRootElement (), MarkerHit)</syntaxhighlight>


{{See also/Server event|Marker events}}
{{See also/Server event|Marker events}}

Revision as of 02:45, 14 January 2008

This event is triggered when a player enters a marker created using createMarker.

Parameters

player hitPlayer, bool matchingDimension
  • hitPlayer: The player that hit the marker
  • matchingDimension: True if the player is in the same dimension as the marker he hit

Source

The source of this event is the marker that got hit by the player.

Example

This will output 'hi' in the chatbox when the marker is hit.

function MarkerHit ( hitPlayer, matchingDimension )
	outputChatBox ( "hi" )
end
addEventHandler("onMarkerHit", getRootElement (), MarkerHit)

See Also

Marker events


Event functions