- Documentation
- Server functions
- getPedContactElement
Function
getPedContactElement
Returns the element a ped is standing on, e.g. a vehicle or an object (when a player stands on a bus roof it returns the bus). Returns false when the ped stands on regular map ground.
Syntax
element getPedContactElement(ped ped)Arguments
pedped- A player or an NPC.
Returns
A vehicle, an object, or false.
Example
local under = getPedContactElement(player)
if under and getElementType(under) == "vehicle" then outputChatBox("Stoisz na pojeździe.", player) end