ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getPedContactElement

Function

getPedContactElement

ServerPedsIdentical to MTA:SA

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

See also