EntityClient

playEntityAnim

PLAY_ENTITY_ANIM0x7FB218262B810701

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

SignatureJavaScript
playEntityAnim(
  entity: Entity,
  animName: string,
  animDict: string,
  p3: number,
  loop: boolean,
  stayInAnim: boolean,
  p6: boolean,
  delta: number,
  bitset: any
): boolean
SignatureLua
playEntityAnim(
  entity: Entity,
  animName: string,
  animDict: string,
  p3: number,
  loop: boolean,
  stayInAnim: boolean,
  p6: boolean,
  delta: number,
  bitset: any
): boolean

Usage

JavaScript
const result = playEntityAnim(
  entity, animName, animDict, p3, loop, stayInAnim, p6, delta, bitset
);
Lua
local result = playEntityAnim(
    entity, animName, animDict, p3, loop, stayInAnim, p6, delta, bitset
)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
animNamestringstringstring
animDictstringstringstring
p3floatnumbernumber
loopBOOLbooleanboolean
stayInAnimBOOLbooleanboolean
p6BOOLbooleanboolean
deltafloatnumbernumber
bitsetAnyanyany

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.

delta and bitset are guessed fields. They are based on the fact that most of the calls have 0 or nil field types passed in.

The only time bitset has a value is 0x4000 and the only time delta has a value is during stealth with usually <1.0f values.

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_ENTITY_ANIM(Entity entity, const char* animName, const char* animDict, float p3, BOOL loop, BOOL stayInAnim, BOOL p6, float delta, Any bitset)
Hash
0x7FB218262B810701

Open in the interactive natives reference