OnClientPlayerPickupHit: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Typo)
No edit summary
Line 21: Line 21:
addEventHandler("onClientPlayerPickupHit", localPlayer, clientPlayerPickupHit)
addEventHandler("onClientPlayerPickupHit", localPlayer, clientPlayerPickupHit)
</syntaxhighlight>
</syntaxhighlight>
==Requirements==
{{Requirements|n/a|1.3.0-9.03919|}}


==See Also==
==See Also==

Revision as of 04:20, 19 March 2012

This event triggers whenever a player hits a pickup locally.

Parameters

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

Source

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

Example

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

local function clientPlayerPickupHit(thePickup, matchingDimension)
    outputChatBox("* You have hit a pickup!", 255, 0, 0)
end
addEventHandler("onClientPlayerPickupHit", localPlayer, clientPlayerPickupHit)

Requirements

This template will be deleted.

See Also

Client pickup events


Client player events


Client event functions