OnPlayerMarkerHit: Difference between revisions
Jump to navigation
Jump to search
m (See Also for server events) |
(Added an example.) |
||
Line 15: | Line 15: | ||
==Example== | ==Example== | ||
This example outputs when a player hits a marker. | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- | function markerAlert(markerHit,matchingDimension) | ||
if (matchingDimension) then -- Make sure the player is in the same dimension as the marker (so they're actually going into it). | |||
-- | outputChatBox("You have just entered a marker.",source,255,255,0) -- Output that they are. | ||
end | |||
end | |||
addEventHandler("onPlayerMarkerHit",getRootElement(),markerAlert) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
{{See also/Server event|Player events}} | {{See also/Server event|Player events}} | ||
Revision as of 02:58, 31 May 2010
This event is triggered when a player hits a marker.
Parameters
marker markerHit, bool matchingDimension
- markerHit: The marker the player hit
- matchingDimension: Whether the player and the marker he hit are in the same dimension
Source
The source of this event is the player that hit the marker.
Example
This example outputs when a player hits a marker.
function markerAlert(markerHit,matchingDimension) if (matchingDimension) then -- Make sure the player is in the same dimension as the marker (so they're actually going into it). outputChatBox("You have just entered a marker.",source,255,255,0) -- Output that they are. end end addEventHandler("onPlayerMarkerHit",getRootElement(),markerAlert)
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