OnPickupUse: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server event}} | |||
This event is triggered when a player stands on a pickup while not in a vehicle. | This event is triggered when a player stands on a pickup while not in a vehicle. | ||
== | ==Parameters== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
void onPickupUse ( player player ) | void onPickupUse ( player player ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
*'''player''': A player element refering to the player who used the pickup | *'''player''': A player element refering to the player who used the pickup | ||
==Source== | |||
The [[event system#Event source|source]] of this event is the [[pickup]] that is getting used by the player. | |||
===Canceling=== | ===Canceling=== |
Revision as of 05:02, 30 December 2007
This event is triggered when a player stands on a pickup while not in a vehicle.
Parameters
void onPickupUse ( player player )
- player: A player element refering to the player who used the pickup
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 announces whena player picks up a pickup
addEventHandler ( "onPickupUse", getRootElement(), "pickupUse" ) function pickupUse ( thePlayer ) outputChatBox ( getClientName ( thePlayer ) .. " picked up a pickup!" ) end
See Also
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled