M MY Multiplayer: Wiki
Side
Kind

getPedSimplestTask

Client

Gets the simplest task the ped is running right now.

string|false getPedSimplestTask(ped ped)

Parameters

NameTypeDescription
pedpedThe ped or player.

Returns

The task's name, such as TASK_SIMPLE_PLAYER_ON_FOOT, or false if the ped has no active task.

Example

addEventHandler("onClientRender", root, function()
    dxDrawText(tostring(getPedSimplestTask(localPlayer)), 20, 300)
end)

See also