- Documentation
- Server events
- onPlayerContact
Event
onPlayerContact
The element under the player's feet changed (a vehicle or an object they stand on).
Handler
addEventHandler("onPlayerContact", root, function(previous, current) ... end)Parameters
previouselement- Previous element or
false. currentelement- Current element or
false.
Source
source is the player.
Example
addEventHandler("onPlayerContact", root, function(_, current)
if current and getElementType(current) == "vehicle" then
outputChatBox("Stoisz na pojeździe.", source)
end
end)