OnPickupUse: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
m (See Also for server events)
Line 25: Line 25:
</syntaxhighlight>
</syntaxhighlight>


==See Also==
{{See also/Server event|Pickup events}}
{{Event_functions}}

Revision as of 17:43, 12 January 2008

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

Pickup events


Event functions