isPedDoingTask
Cliente
Indica si un ped está ejecutando una tarea, en cualquier slot y en cualquier nivel de subtarea.
bool isPedDoingTask(ped ped, string taskName)
Parámetros
| Nombre | Tipo | Descripción |
|---|---|---|
| ped | ped | El ped o jugador. |
| taskName | string | El nombre de la tarea, como TASK_SIMPLE_SWIM. Da igual mayúsculas o minúsculas. |
Retorno
true si la tarea está en curso, false si no o si el ped no existe en el juego.
Ejemplo
if isPedDoingTask(localPlayer, "TASK_SIMPLE_SWIM") then
print("Swimming")
end