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

Function

getPedSimplestTask

ServerPedsIdentical to MTA:SA

Returns the name of the most recently set task (across all layers), i.e. what the ped is doing right now according to scripts. Returns false when the ped has no tasks.

Syntax

string getPedSimplestTask(ped ped)

Arguments

pedped
A player or an NPC.

Returns

Task name, or false.

Example

outputServerLog(tostring(getPedSimplestTask(guard)))

See also