GetPedSimplestTask: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: __NOTOC__ {{Client function}} This function is used to get the name of a specified ped's current simplest task.<br> ==Syntax== <syntaxhighlight lang="lua"> string getPedSimplestTask ( ped thePed ) <...)
 
m (link to getPedTask)
Line 2: Line 2:
{{Client function}}
{{Client function}}
This function is used to get the name of a specified ped's current simplest [[task]].<br>
This function is used to get the name of a specified ped's current simplest [[task]].<br>
See [[getPedTask]] to get a all tasks.


==Syntax==
==Syntax==

Revision as of 00:53, 28 February 2011

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

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 "sTask" command.

function showSTask ()
  local thetask = getPedSimplestTask ( getLocalPlayer() )
  outputChatBox ( getPlayerName ( getLocalPlayer() ) .. "'s simplest task is: " .. thetask )
end
addCommandHandler ( "sTask", showSTask )

See Also