M MY Multiplayer: Wiki
Lado
Tipo

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

NombreTipoDescripción
pedpedEl ped o jugador.
taskNamestringEl 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

Ver también