OnClientPickupHit: Difference between revisions
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
The source of this event is the pickup that was hit. | The source of this event is the pickup that was hit. | ||
==Example== | |||
This example outputs a message whenever a player hits a pickup locally. | |||
<syntaxhighlight lang="lua"> | |||
local function clientPickupHit(thePlayer, matchingDimension) | |||
outputChatBox("* "..getPlayerName(thePlayer).." hit a pickup!", 255, 0, 0) | |||
end | |||
addEventHandler("onClientPickupHit", root, clientPickupHit) | |||
</syntaxhighlight> | |||
==See Also== | ==See Also== |
Latest revision as of 00:13, 2 June 2013
This event triggers whenever a pickup is hit clientside.
Parameters
player thePlayer, bool matchingDimension
- thePlayer: the player that hit the pickup
- matchingDimension: true if thePlayer is in the same dimension as the pickup, false otherwise.
Source
The source of this event is the pickup that was hit.
Example
This example outputs a message whenever a player hits a pickup locally.
local function clientPickupHit(thePlayer, matchingDimension) outputChatBox("* "..getPlayerName(thePlayer).." hit a pickup!", 255, 0, 0) end addEventHandler("onClientPickupHit", root, clientPickupHit)
See Also
Client pickup events
Client player events
- onClientPlayerChangeNick
- onClientPlayerChoke
- onClientPlayerDamage
- onClientPlayerHeliKilled
- onClientPlayerHitByWaterCannon
- onClientPlayerJoin
- onClientPlayerPickupHit
- onClientPlayerPickupLeave
- onClientPlayerQuit
- onClientPlayerRadioSwitch
- onClientPlayerSpawn
- onClientPlayerStealthKill
- onClientPlayerStuntFinish
- onClientPlayerStuntStart
- onClientPlayerTarget
- onClientPlayerVehicleEnter
- onClientPlayerVehicleExit
- onClientPlayerVoicePause
- onClientPlayerVoiceResumed
- onClientPlayerVoiceStart
- onClientPlayerVoiceStop
- onClientPlayerWasted
- onClientPlayerWeaponFire
- onClientPlayerWeaponSwitch
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled