OnPickupUse

From Multi Theft Auto: Wiki
Revision as of 12:22, 27 August 2009 by Awwu (talk | contribs) (→‎Example)
Jump to navigation Jump to search

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

Parameters

player playerWhoUsed
  • playerWhoUsed: 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

function pickupUse ( thePlayer )
    outputChatBox ( getPlayerName ( thePlayer ) .. " picked up a pickup!" )
end
addEventHandler ( "onPickupUse", getRootElement(), pickupUse )

See Also

Pickup events


Event functions