onPlayerMarkerLeave | Multi Theft Auto: Wiki Skip to content

onPlayerMarkerLeave

Client-side
Server-side
Shared

This event is triggered when a player leaves the area of a marker.

Parameters

marker markerLeft, bool matchingDimension
  • markerLeft: the marker the player left.
  • matchingDimension: a boolean representing whether the player and the left marker are in the same dimension.

Source

element: The source of this event is the player that left the marker.

Code Examples

server

This example will output the name of the player that has left a specific marker to the chatbox.

-- Create our marker
marker = createMarker(1248,2012,123,"corona",7,255,255,255,255)
function someoneLeftMarker(markerLeft,matchingDimension)
-- Output our message
outputChatBox(getPlayerName(source).." has left the marker!",getRootElement(),255,0,0)
end
-- Add an event handler to trigger our function
addEventHandler("onPlayerMarkerLeave",marker,someoneLeftMarker)

See Also