TasksClient2 outputs

getPatrolTaskInfo

GET_PATROL_TASK_INFO0x52F734CEBE20DFBA

The GTA V native GET_PATROL_TASK_INFO of the TASK namespace, as LS:MP client scripts call it: the global function getPatrolTaskInfo, in JavaScript and in Lua.

SignatureJavaScript
getPatrolTaskInfo(ped: Ped): [
  ok: boolean,
  timeLeftAtNode: number,
  nodeId: number
]
SignatureLua
getPatrolTaskInfo(ped: Ped): boolean, integer, integer

Usage

JavaScript
const [ok, timeLeftAtNode, nodeId] = getPatrolTaskInfo(ped);
Lua
local ok, timeLeftAtNode, nodeId = getPatrolTaskInfo(ped)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger

Returns

3 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1okBOOLbooleanbooleanThe native’s own return value.
2timeLeftAtNodeintnumberintegeroutput
3nodeIdintnumberintegeroutput

Reference

Namespace
Tasks TASK
In the game
BOOL GET_PATROL_TASK_INFO(Ped ped, int* timeLeftAtNode, int* nodeId)
Hash
0x52F734CEBE20DFBA
Introduced
Game build 2545 legacy numbering
Formerly
_GET_PATROL_TASK_STATUS

Open in the interactive natives reference