GetPlayerSimplestTask

From Multi Theft Auto: Wiki
Revision as of 11:33, 7 August 2007 by Driver2 (talk | contribs)
Jump to navigation Jump to search

This function is used to get the name of a specified players current simplest task.

Syntax

string getPlayerSimplestTask ( player thePlayer )

Required Arguments

  • thePlayer: The player whose task you want to retrieve.

Returns

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

Example

This example prints the name of a players simplest task to the chat, when they use the "sTask" command.

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

See Also