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

Function

getPedAimTarget

ServerPedsTrilogy Hub only

Returns the world point a ped is aiming at, as reported by the player's game. Returns false when the game has not sent an aim point yet.

Syntax

float, float, float getPedAimTarget(ped ped)

Arguments

pedped
A player or an NPC.

Returns

The target's x, y, z, or false.

Example

local x, y, z = getPedAimTarget(player)

See also