GetPedSimplestTask

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

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

[[{{{image}}}|link=|]] Note: See getPedTask to get a all tasks.

Syntax

string getPedSimplestTask ( ped thePed )

Required Arguments

  • thePed: The ped whose task you want to retrieve.

Returns

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

Example

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

* FEATURE ADDED IN 1.5.9 (BETA: 1.5.8 r20935):
* FEATURE ADDED IN 1.5.9 (BETA: 1.5.8 r20935):
* FEATURE ADDED IN 1.5.9 (BETA: 1.5.8 r20740):