- Documentation
- Shared functions
- getPedFocus
Function
getPedFocus
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)