OnPlayerContact: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server event}} | {{Server event}} | ||
This event is triggered when a player stands on a | This event is triggered when a player stands on a different element than before. | ||
==Parameters== | ==Parameters== | ||
Line 8: | Line 8: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
*'''previousElement''': | *'''previousElement''': the [[element]] [[player]] was standing on before. ''nil'' if none. | ||
*'''currentElement''': | *'''currentElement''': the new [[element]] that the [[player]] is standing on now. ''nil'' if none. | ||
==Source== | ==Source== | ||
Line 25: | Line 25: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{See also/Server event|Player events}} | |||
{{ |
Latest revision as of 03:01, 27 September 2018
This event is triggered when a player stands on a different element than before.
Parameters
element previousElement, element currentElement
- previousElement: the element player was standing on before. nil if none.
- currentElement: the new element that the player is standing on now. nil if none.
Source
The source of this event is the player who hit an element.
Example
This example outputs the element type of an element you have hit
function outputElementType ( prev, current ) if ( current ) then outputChatBox ( "You have hit an "..getElementType ( current ) ) end end addEventHandler ( "onPlayerContact", getRootElement(), outputElementType )
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