# isPedDoingTask (Cliente)

> Diz se um ped está executando uma tarefa, em qualquer slot e em qualquer nível de subtarefa.

- **Plataforma**: MY Multiplayer (MYMP)
- **Tipo**: Função Lua
- **Lado**: Cliente
- **Categoria**: Peds
- **URL**: https://wiki.mymp.gg/pt/isPedDoingTask

## Sintaxe

```lua
bool isPedDoingTask(ped ped, string taskName)
```

## Parâmetros

| Nome | Tipo | Descrição |
| --- | --- | --- |
| `ped` | `ped` | O ped ou jogador. |
| `taskName` | `string` | O nome da tarefa, como `TASK_SIMPLE_SWIM`. Maiúsculas e minúsculas tanto faz. |

## Retorno

`true` se a tarefa está em andamento, `false` se não está ou se o ped não existe no jogo.

## Exemplo

```lua
if isPedDoingTask(localPlayer, "TASK_SIMPLE_SWIM") then
    print("Swimming")
end
```

## Veja também

- [getPedTask (Cliente)](https://wiki.mymp.gg/pt/getPedTask.md): Lê a tarefa que um ped executa num slot e todas as subtarefas dela.
- [getPedSimplestTask (Cliente)](https://wiki.mymp.gg/pt/getPedSimplestTask.md): Lê a tarefa mais simples que o ped está executando agora.
- [killPedTask (Cliente)](https://wiki.mymp.gg/pt/killPedTask.md): Remove a tarefa que um ped executa num slot.
