From Multi Theft Auto: Wiki
Jump to navigation Jump to search

This event triggers whenever a player hits a pickup locally.


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


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


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)
addEventHandler("onClientPlayerPickupHit", localPlayer, clientPlayerPickupHit)


Minimum server version n/a
Minimum client version 1.3.0-9.03919

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.3.0-9.03919" />

See Also

Client pickup events

Client player events

Client event functions