onClientPickupHit
Client-side
Server-side
Shared
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
element: The source of this event is the pickup that was hit.
Code Examples
client
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)endaddEventHandler("onClientPickupHit", root, clientPickupHit)
See Also
Pickup Events
- onClientPickupLeave
- onClientPickupHit
- onPickupHit
- onPickupLeave
- onPickupSpawn
- onPickupUse