{"hash":"0x5AB552C6","ns":"CFX","name":"TASK_PLAY_ANIM","slug":"TASK_PLAY_ANIM","official":true,"named":true,"luaName":"TaskPlayAnim","game":"cfx","apiset":"server","returnType":"void","params":[{"name":"ped","type":"Ped","description":"The ped you want to play the animation"},{"name":"animDictionary","type":"char*","description":"The animation dictionary"},{"name":"animationName","type":"char*","description":"The animation name"},{"name":"blendInSpeed","type":"float","description":"The speed at which the animation blends in. Lower is slower and higher is faster, 1.0 is normal, 8.0 is basically instant"},{"name":"blendOutSpeed","type":"float","description":"The speed at which the animation blends out. Lower is slower and higher is faster, 1.0 is normal, 8.0 is basically instant"},{"name":"duration","type":"int","description":"The duration of the animation in milliseconds. -1 will play the animation until canceled"},{"name":"flag","type":"int","description":"The animation flags (see enum)"},{"name":"playbackRate","type":"float","description":"The playback rate (between 0.0 and 1.0)"},{"name":"lockX","type":"BOOL"},{"name":"lockY","type":"BOOL"},{"name":"lockZ","type":"BOOL"}],"summary":"Animations list This is the server-side RPC native equivalent of the client native TASK_PLAY_ANIM.","descriptions":[{"source":"cfx","format":"md","body":"[Animations list](https://alexguirre.github.io/animations-list/)\n\n```cpp\nenum eScriptedAnimFlags\n{\nAF_LOOPING = 1,\nAF_HOLD_LAST_FRAME = 2,\nAF_REPOSITION_WHEN_FINISHED = 4,\nAF_NOT_INTERRUPTABLE = 8,\nAF_UPPERBODY = 16,\nAF_SECONDARY = 32,\nAF_REORIENT_WHEN_FINISHED = 64,\nAF_ABORT_ON_PED_MOVEMENT = 128,\nAF_ADDITIVE = 256,\nAF_TURN_OFF_COLLISION = 512,\nAF_OVERRIDE_PHYSICS = 1024,\nAF_IGNORE_GRAVITY = 2048,\nAF_EXTRACT_INITIAL_OFFSET = 4096,\nAF_EXIT_AFTER_INTERRUPTED = 8192,\nAF_TAG_SYNC_IN = 16384,\nAF_TAG_SYNC_OUT = 32768,\nAF_TAG_SYNC_CONTINUOUS = 65536,\nAF_FORCE_START = 131072,\nAF_USE_KINEMATIC_PHYSICS = 262144,\nAF_USE_MOVER_EXTRACTION = 524288,\nAF_HIDE_WEAPON = 1048576,\nAF_ENDS_IN_DEAD_POSE = 2097152,\nAF_ACTIVATE_RAGDOLL_ON_COLLISION = 4194304,\nAF_DONT_EXIT_ON_DEATH = 8388608,\nAF_ABORT_ON_WEAPON_DAMAGE = 16777216,\nAF_DISABLE_FORCED_PHYSICS_UPDATE = 33554432,\nAF_PROCESS_ATTACHMENTS_ON_START = 67108864,\nAF_EXPAND_PED_CAPSULE_FROM_SKELETON = 134217728,\nAF_USE_ALTERNATIVE_FP_ANIM = 268435456,\nAF_BLENDOUT_WRT_LAST_FRAME = 536870912,\nAF_USE_FULL_BLENDING = 1073741824\n}\n```\n\n**This is the server-side RPC native equivalent of the client native [TASK_PLAY_ANIM](?\\_0xEA47FE3719165B94).**"}],"examples":[],"aliases":[],"enums":["eScriptedAnimFlags"],"related":[],"sources":["cfx"],"doc":2,"url":"https://natives.borderlinerp.com/natives/CFX/TASK_PLAY_ANIM","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/TASK_PLAY_ANIM.md","snippets":{"lua":"TaskPlayAnim(ped, animDictionary, animationName, blendInSpeed, blendOutSpeed, duration, flag, playbackRate, lockX, lockY, lockZ)","luaInvoke":"Citizen.InvokeNative(0x5ab552c6, ped, animDictionary, animationName, blendInSpeed, blendOutSpeed, duration, flag, playbackRate, lockX, lockY, lockZ)","js":"TaskPlayAnim(ped, animDictionary, animationName, blendInSpeed, blendOutSpeed, duration, flag, playbackRate, lockX, lockY, lockZ);","jsInvoke":"Citizen.invokeNative('0x5ab552c6', ped, animDictionary, animationName, blendInSpeed + 0.0000001, blendOutSpeed + 0.0000001, duration, flag, playbackRate + 0.0000001, lockX, lockY, lockZ);","csharp":"Function.Call((Hash)0x5ab552c6, ped, animDictionary, animationName, blendInSpeed, blendOutSpeed, duration, flag, playbackRate, lockX, lockY, lockZ);","notes":["Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason."]}}