playEntityAnim
PLAY_ENTITY_ANIM0x7FB218262B810701The 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.
playEntityAnim(
entity: Entity,
animName: string,
animDict: string,
p3: number,
loop: boolean,
stayInAnim: boolean,
p6: boolean,
delta: number,
bitset: any
): booleanplayEntityAnim(
entity: Entity,
animName: string,
animDict: string,
p3: number,
loop: boolean,
stayInAnim: boolean,
p6: boolean,
delta: number,
bitset: any
): booleanUsage
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
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
animName | string | string | string |
animDict | string | string | string |
p3 | float | number | number |
loop | BOOL | boolean | boolean |
stayInAnim | BOOL | boolean | boolean |
p6 | BOOL | boolean | boolean |
delta | float | number | number |
bitset | Any | any | any |
Returns
BOOL JavaScript boolean, Lua booleanNotes
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