OnPickupUse: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 27: | Line 27: | ||
==See Also== | ==See Also== | ||
===Pickup events=== | |||
{{Pickup events}} | {{Pickup events}} | ||
===Event functions=== | |||
{{Event functions}} |
Revision as of 02:10, 27 September 2018
This event is triggered when a player stands on a pickup while not in a vehicle.
Tip: Pickups use colshapes, you can get the colshape of the pickup with getElementColShape and use colshape events to it. |
Parameters
player playerWhoUsed
Source
The source of this event is the pickup that is getting used by the player.
Canceling
If this event is canceled, the player will not be given the item they picked up.
Example
This example outputs a message to the chatbox when a player uses a pickup.
function pickupUse( thePlayer ) outputChatBox( getPlayerName( thePlayer ) .. " used a pickup!" ) end addEventHandler( "onPickupUse", root, pickupUse )
See Also
Pickup events
Event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled