ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getPedFocus

Function

getPedFocus

Server and clientPedsTrilogy Hub only

Returns the element an NPC keeps looking at (set with setPedFocus) and whether it turns its head too. On the client it returns the local setting first, and the server's one when there is none. Returns false when the NPC is not focused on anything.

Syntax

element, bool getPedFocus(ped ped)

Arguments

pedped
The NPC.

Returns

The target and true/false (head too), or false.

Example

local target, head = getPedFocus(ped)

See also