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

Function

getPedLookAt

ServerPedsTrilogy Hub only

Returns the point a ped should look at according to the last setPedLookAt, and the time (in getTickCount units) until which the look lasts. Returns false when nothing was set.

Syntax

float, float, float, int getPedLookAt(ped ped)

Arguments

pedped
A player or an NPC.

Returns

The point's x, y, z and the end time (ms, like getTickCount), or false.

Example

local x, y, z, untilTick = getPedLookAt(ped)
if x and untilTick > getTickCount() then outputServerLog("wciąż patrzy") end

See also