M MY Multiplayer: Wiki
Side
Kind

onClientElementColShapeHit

ClientEvent

Fired on a player, ped, vehicle or object when it enters a collision shape on this client.

addEventHandler("onClientElementColShapeHit", root, function(element colShape, bool matchingDimension) … end)

Handler parameters

NameTypeDescription
colShapeelementThe collision shape it entered.
matchingDimensionboolWhether the element is in the same dimension as the shape.

Source

The element that entered.

It fires right after onClientColShapeHit, unless a handler of that one destroyed the element.

Example

addEventHandler("onClientElementColShapeHit", localPlayer, function(colShape, matchingDimension)
    if matchingDimension then
        outputDebugString("Entered a zone")
    end
end)

See also