getPedSimplestTask | Multi Theft Auto: Wiki Skip to content

getPedSimplestTask

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function is used to get the name of a specified ped's current simplest task.

Note

See getPedTask to get a ped's task.

Syntax

string getPedSimplestTask ( ped thePed )
Required Arguments
  • thePed: The ped whose task you want to retrieve.

Returns

  • string: value

Returns a string representing the name of the ped's simplest, active task .

Code Examples

shared

This example prints the name of a player's simplest task to the chat, when they use the "simplestTask" command.

function showSimplestTask()
local taskName = getPedSimplestTask(localPlayer)
local playerName = getPlayerName(localPlayer)
outputChatBox(playerName.."'s simplest task is: "..taskName)
end
addCommandHandler("simplestTask", showSimplestTask)

See Also