The Lab
ENTITY native

PLAY_ENTITY_ANIM

returns BOOL9 paramsbuild 1207

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

C
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 b1207

Parameters

#NameType
1entityEntity
2animNameconst char*
3animDictconst char*
4p3float
5loopBOOL
6stayInAnimBOOL
7p6BOOL
8deltafloat
9bitsetAny

Facts

Facts about PLAY_ENTITY_ANIM
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.

Lua
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
JavaScript
// 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) {
  // ...
}
C#
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
);
All ENTITY natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.