OnClientPlayerPickupHit: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
Line 21: | Line 21: | ||
addEventHandler("onClientPlayerPickupHit", localPlayer, clientPlayerPickupHit) | addEventHandler("onClientPlayerPickupHit", localPlayer, clientPlayerPickupHit) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== |
Latest revision as of 17:01, 7 November 2024
This event triggers whenever a player hits a pickup locally.
Parameters
pickup thePickup, bool matchingDimension
- thePickup: the pickup that was hit.
- matchingDimension: true if thePickup is in the same dimension as the player, false otherwise.
Source
The source of this event is the player that hit the pickup.
Example
This example outputs a message whenever the local player hits a pickup.
local function clientPlayerPickupHit(thePickup, matchingDimension) outputChatBox("* You have hit a pickup!", 255, 0, 0) end addEventHandler("onClientPlayerPickupHit", localPlayer, clientPlayerPickupHit)
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