Grand opening25% off everything with FAM-261023-261025-UL4B9this weekendAdded for you at checkout Halloween Edition36 maps, limited runlimited runShop the drop

FREE TOOL · TaskPlayAnim

Animation flags calculator

Build the flag value for TaskPlayAnim. All 31 documented flags with what each one does, the combinations people actually use, and the snippet filled in.

31 documented — every row says which it is. Names from the FiveM native docs — TASK_PLAY_ANIM.

Value0
Hex0x00000000
Flags set0

00000000000000000000000000000000

Presets
Value 0
local dict = "amb@world_human_smoking@male@male_a@idle_a"
RequestAnimDict(dict)
while not HasAnimDictLoaded(dict) do
    Wait(0)
end

-- Flag 0. Playback rate 1.0 — the native documents 0.0 to 1.0, and 0.0
-- is a common way to end up with a clip that never moves.
TaskPlayAnim(PlayerPedId(), dict, "idle_a", 8.0, -8.0, -1, 0, 1.0, false, false, false)
RemoveAnimDict(dict)

QUESTIONS

About animation flags calculator

What is the difference between 1 and 49?
1 loops the clip across the whole body, so the ped stands still. 49 is 1 + 16 + 32 — loop, upper body, secondary — which plays the clip on the torso while the legs keep walking. That is the combination most emote scripts want.
Is there a cancelable flag?
Not as such. The value 120 circulates as "cancelable", but 120 is 8 + 16 + 32 + 64 and 8 is AF_NOT_INTERRUPTABLE — it includes the flag that stops the player cancelling. If you want the player to be able to break out, leave 8 off.
Why does my animation not move at all?
Check the playback rate. The native documents it as 0.0 to 1.0, and a lot of copied snippets pass 0.0, which plays the clip at zero speed. Pass 1.0.

ALSO FREE

Tools that go with this one

Picked because they touch the same files, natives or part of the game.