OnPlayerMarkerLeave: Difference between revisions
Jump to navigation
Jump to search
(New page: Category:Incomplete Event __NOTOC__ This event is triggered when a player leaves a marker. ==Syntax== <syntaxhighlight lang="lua"> void onPlayerMarkerLeave ( marker hitmarker, bool matchingDimens...) |
No edit summary |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
[[ | __NOTOC__ | ||
{{Server event}} | |||
This event is triggered when a [[player]] leaves the area of a [[marker]]. | |||
==Parameters== | |||
== | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
marker markerLeft, bool matchingDimension | |||
</syntaxhighlight> | </syntaxhighlight> | ||
*'''markerLeft''': the [[marker]] the [[player]] left. | |||
*'''matchingDimension''': a [[boolean]] representing whether the [[player]] and the left [[marker]] are in the same [[dimension]]. | |||
==Source== | |||
The [[event system#Event source|source]] of this event is the [[player]] that left the marker. | |||
==Example== | ==Example== | ||
This example | This example will output the name of the player that has left a specific marker to the chatbox. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- | -- 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) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
{{See also/Server event|Player events}} |
Latest revision as of 03:01, 27 September 2018
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
The source of this event is the player that left the marker.
Example
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
Player events
- onPlayerACInfo
- onPlayerBan
- onPlayerChangeNick
- onPlayerChat
- onPlayerClick
- onPlayerCommand
- onPlayerConnect
- onPlayerContact
- onPlayerDamage
- onPlayerJoin
- onPlayerLogin
- onPlayerLogout
- onPlayerMarkerHit
- onPlayerMarkerLeave
- onPlayerModInfo
- onPlayerMute
- onPlayerNetworkStatus
- onPlayerPickupHit
- onPlayerPickupLeave
- onPlayerPickupUse
- onPlayerPrivateMessage
- onPlayerQuit
- onPlayerScreenShot
- onPlayerSpawn
- onPlayerStealthKill
- onPlayerTarget
- onPlayerUnmute
- onPlayerVehicleEnter
- onPlayerVehicleExit
- onPlayerVoiceStart
- onPlayerVoiceStop
- onPlayerWasted
- onPlayerWeaponFire
- onPlayerWeaponSwitch
Event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled