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

Function

getPedTargetEnd

ServerPedsIdentical to MTA:SA

Returns the end point of a ped's line of fire: the target set with setPedAimTarget, or when none, a point 100 m ahead of the ped in the direction it faces.

Syntax

float, float, float getPedTargetEnd(ped ped)

Arguments

pedped
A player or an NPC.

Returns

x, y, z, or false.

Example

local ex, ey, ez = getPedTargetEnd(player)

See also