OnClientPlayerPickupLeave: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Documented onClientPlayerPickupLeave)
 
m (Typo)
Line 5: Line 5:
==Parameters==
==Parameters==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
player thePickup, bool matchingDimension
pickup thePickup, bool matchingDimension
</syntaxhighlight>
</syntaxhighlight>
*'''thePickup:''' the pickup that was left.
*'''thePickup:''' the pickup that was left.

Revision as of 03:36, 19 March 2012

This event triggers whenever a player leaves pickup locally.

Parameters

pickup thePickup, bool matchingDimension
  • thePickup: the pickup that was left.
  • matchingDimension: true if thePickup is in the same dimension as the player, false otherwise.

Source

The source of this event is the player that left the pickup.

Example

This example outputs a message whenever the local player leaves a pickup.

local function clientPlayerPickupLeave(thePickup, matchingDimension)
    outputChatBox("* You have left a pickup!", 255, 0, 0)
end
addEventHandler("onClientPlayerPickupLeave", localPlayer, clientPlayerPickupLeave)

See Also

Client pickup events


Client player events


Client event functions