From Multi Theft Auto: Wiki

This event is triggered when a player stands on a pickup while not in a vehicle.

[[{{{image}}}|link=]] Tip: Pickups use colshapes, you can get the colshape of the pickup with getElementColShape and use colshape events to it.


player playerWhoUsed
  • playerWhoUsed: a player element referring to the player who used the pickup.


The source of this event is the pickup that is getting used by the player.


If this event is canceled, the player will not be given the item they picked up.


This example outputs a message to the chatbox when a player uses a pickup.

function pickupUse( thePlayer )
    outputChatBox( getPlayerName( thePlayer ) .. " used a pickup!" )
addEventHandler( "onPickupUse", root, pickupUse )

See Also

Pickup events

Event functions