EntityClient

playSynchronizedEntityAnim

PLAY_SYNCHRONIZED_ENTITY_ANIM0xC77720A12FE14A86

The GTA V native PLAY_SYNCHRONIZED_ENTITY_ANIM of the ENTITY namespace, as LS:MP client scripts call it: the global function playSynchronizedEntityAnim, in JavaScript and in Lua.

SignatureJavaScript
playSynchronizedEntityAnim(
  entity: Entity,
  syncedScene: number,
  animation: string,
  propName: string,
  p4: number,
  p5: number,
  p6: any,
  p7: number
): boolean
SignatureLua
playSynchronizedEntityAnim(
  entity: Entity,
  syncedScene: integer,
  animation: string,
  propName: string,
  p4: number,
  p5: number,
  p6: any,
  p7: number
): boolean

Usage

JavaScript
const result = playSynchronizedEntityAnim(
  entity, syncedScene, animation, propName, p4, p5, p6, p7
);
Lua
local result = playSynchronizedEntityAnim(
    entity, syncedScene, animation, propName, p4, p5, p6, p7
)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
syncedSceneintnumberinteger
animationstringstringstring
propNamestringstringstring
p4floatnumbernumber
p5floatnumbernumber
p6Anyanyany
p7floatnumbernumber

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

p4 and p7 are usually 1000.0f.

Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json

Reference

Namespace
Entity ENTITY
In the game
BOOL PLAY_SYNCHRONIZED_ENTITY_ANIM(Entity entity, int syncedScene, const char* animation, const char* propName, float p4, float p5, Any p6, float p7)
Hash
0xC77720A12FE14A86

Open in the interactive natives reference