Check if the player play an animation

Hello, this is possible de check if a player play a specific animation please ?

IsEntityPlayingAnim(ped, "mp_arresting", "idle", 3)

Thank you Xander, now I will be able to finish my strength and stamina training in esx, if you are interrested I will give you my script when I finish It tomorrow :slight_smile:

No thanks. I don’t use ESX.

Can chack if player is making any animation? not a specific animation.

Hey, try this code :

local ped = PlayerPedId()

local function IsPlayingScriptedAnim(ped)
return GetIsTaskActive(ped, 134) – CTaskScriptedAnimation (TaskPlayAnim)
end

local function IsInSyncScene(ped)
return GetIsTaskActive(ped, 135) – CTaskSynchronizedScene
end

local function IsInScenario(ped)
return IsPedUsingAnyScenario(ped) – WORLD_HUMAN_* scenarios, etc.
end

if IsPlayingScriptedAnim(ped) or IsInSyncScene(ped) or IsInScenario(ped) then
print(“Player is busy with an animation”)
end