PLAY_ENTITY_ANIM
Plays the given animation on the entity, with options for looping and holding the last frame. Returns true on success.
Load the animation dictionary first with REQUEST_ANIM_DICT.
Signature
BOOL PLAY_ENTITY_ANIM(Entity entity, const char* animName, const char* animDict, float p3, BOOL loop, BOOL stayInAnim, BOOL p6, float delta, Any bitset); // 0xDC6D22FAB76D4874 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | entity | Entity |
| 2 | animName | const char* |
| 3 | animDict | const char* |
| 4 | p3 | float |
| 5 | loop | BOOL |
| 6 | stayInAnim | BOOL |
| 7 | p6 | BOOL |
| 8 | delta | float |
| 9 | bitset | Any |
Facts
| Name | PLAY_ENTITY_ANIM |
|---|---|
| Hash | 0xDC6D22FAB76D4874 |
| Namespace | |
| Returns | BOOL |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0xDC6D22FAB76D4874, -- PLAY_ENTITY_ANIM
PlayerPedId(), -- Entity entity
"text", -- const char* animName
"text", -- const char* animDict
0.0, -- float p3
false, -- BOOL loop
false, -- BOOL stayInAnim
false, -- BOOL p6
0.0, -- float delta
0 -- Any bitset
)
if result then
-- ...
end// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0xDC6D22FAB76D4874", // PLAY_ENTITY_ANIM
PlayerPedId(), // Entity entity
"text", // const char* animName
"text", // const char* animDict
0.0, // float p3
false, // BOOL loop
false, // BOOL stayInAnim
false, // BOOL p6
0.0, // float delta
0, // Any bitset
Citizen.returnResultAnyway()
);
if (result) {
// ...
}bool result = Function.Call<bool>((Hash)0xDC6D22FAB76D4874, // PLAY_ENTITY_ANIM
API.PlayerPedId(), // Entity entity
"text", // const char* animName
"text", // const char* animDict
0.0f, // float p3
false, // BOOL loop
false, // BOOL stayInAnim
false, // BOOL p6
0.0f, // float delta
0 // Any bitset
);Related ENTITY natives
- _GET_ENTITY_ANIM_CURRENT_TIME
- _GET_LAST_ENTITY_TO_DAMAGE_ENTITY
- _IS_ENTITY_PLAYING_ANY_ANIM
- _SET_ENTITY_ANIM_AGE
- _SET_ENTITY_ANIM_CURRENT_TIME
- _SET_ENTITY_ANIM_SPEED
- ATTACH_ENTITY_TO_ENTITY
- ATTACH_ENTITY_TO_ENTITY_PHYSICALLY
- CLEAR_ENTITY_LAST_DAMAGE_ENTITY
- HAS_ENTITY_ANIM_FINISHED
- HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY
- HAS_ENTITY_CLEAR_LOS_TO_ENTITY
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.