TASK_PLAY_ANIM
Plays the animation animName from animDict on ped with the given blend speeds, duration and flags.
Load the dictionary first with REQUEST_ANIM_DICT.
Signature
void TASK_PLAY_ANIM(Ped ped, const char* animDict, const char* animName, float speed, float speedMultiplier, int duration, int flags, float playbackRate, BOOL p8, int ikFlags, BOOL p10, const char* taskFilter, BOOL p12); // 0xEA47FE3719165B94 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | animDict | const char* |
| 3 | animName | const char* |
| 4 | speed | float |
| 5 | speedMultiplier | float |
| 6 | duration | int |
| 7 | flags | int |
| 8 | playbackRate | float |
| 9 | p8 | BOOL |
| 10 | ikFlags | int |
| 11 | p10 | BOOL |
| 12 | taskFilter | const char* |
| 13 | p12 | BOOL |
Facts
| Name | TASK_PLAY_ANIM |
|---|---|
| Hash | 0xEA47FE3719165B94 |
| Namespace | |
| Returns | void |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
Citizen.InvokeNative(0xEA47FE3719165B94, -- TASK_PLAY_ANIM
PlayerPedId(), -- Ped ped
"text", -- const char* animDict
"text", -- const char* animName
0.0, -- float speed
0.0, -- float speedMultiplier
0, -- int duration
0, -- int flags
0.0, -- float playbackRate
false, -- BOOL p8
0, -- int ikFlags
false, -- BOOL p10
"text", -- const char* taskFilter
false -- BOOL p12
)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
Citizen.invokeNative("0xEA47FE3719165B94", // TASK_PLAY_ANIM
PlayerPedId(), // Ped ped
"text", // const char* animDict
"text", // const char* animName
0.0, // float speed
0.0, // float speedMultiplier
0, // int duration
0, // int flags
0.0, // float playbackRate
false, // BOOL p8
0, // int ikFlags
false, // BOOL p10
"text", // const char* taskFilter
false // BOOL p12
);Function.Call((Hash)0xEA47FE3719165B94, // TASK_PLAY_ANIM
API.PlayerPedId(), // Ped ped
"text", // const char* animDict
"text", // const char* animName
0.0f, // float speed
0.0f, // float speedMultiplier
0, // int duration
0, // int flags
0.0f, // float playbackRate
false, // BOOL p8
0, // int ikFlags
false, // BOOL p10
"text", // const char* taskFilter
false // BOOL p12
);Related TASK natives
- TASK_PLAY_ANIM_ADVANCED
- TASK_PLAY_UPPER_ANIM_FACING_ENTITY
- TASK_PLAY_EMOTE_WITH_HASH
- TASK_ENTER_ANIM_SCENE
- TASK_EVASIVE_ANIM
- TASK_WHISTLE_ANIM
- _TASK_PLAY_EMOTE
- CLEAR_DRIVEBY_TASK_UNDERNEATH_DRIVING_TASK
- IS_DRIVEBY_TASK_UNDERNEATH_DRIVING_TASK
- IS_MOUNTED_WEAPON_TASK_UNDERNEATH_DRIVING_TASK
- PLAY_ANIM_ON_RUNNING_SCENARIO
- PLAY_ENTITY_SCRIPTED_ANIM
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.