TASK_PLAY_ANIM_ADVANCED
Similar in functionality to [`TASK_PLAY_ANIM`](#\_0xEA47FE3719165B94), except the position and rotation parameters let you specify the initial position and rotation of the task. The ped is teleported to the position specified. [Animations list](https://alexguirre.github.io/animations-list/) **This is the server-side RPC native equivalent of the client native [TASK_PLAY_ANIM_ADVANCED](?\_0x83CDB10EA29B370B).**
CFX
Signature
lua
TaskPlayAnimAdvanced(PlayerPedId(), animDictionary, animationName, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, flag, 0.0, p14, p15)
-- returns voidParameters
| Name | Type | Description |
|---|---|---|
| Ped | The ped you want to play the animation | |
| char* | The animation dictionary | |
| char* | The animation name | |
| float | Initial X position of the task | |
| float | Initial Y position of the task | |
| float | Initial Z position of the task | |
| float | Initial X rotation of the task | |
| float | Initial Y rotation of the task | |
| float | Initial Z rotation of the task | |
| float | The speed at which the animation blends in. Lower is slower and higher is faster, 1.0 is normal, 8.0 is basically instant | |
| float | The speed at which the animation blends out. Lower is slower and higher is faster, 1.0 is normal, 8.0 is basically instant | |
| int | The duration of the animation in milliseconds. -1 will play the animation until canceled | |
| Any | See [`TASK_PLAY_ANIM`](#\_0xEA47FE3719165B94) | |
| float | Value between 0.0 and 1.0, lets you start an animation from the given point | |
| Any | — | |
| Any | — |
Usage
lua
TaskPlayAnimAdvanced(PlayerPedId(), animDictionary, animationName, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, flag, 0.0, p14, p15)Generated from the native name, hash, and parameter list. Add a real example.
Details
- Hash
- API set
- Source
- cfx
Source: cfx
