TASK_PLAY_ANIM_ADVANCED
Similar in functionality to TASK_PLAY_ANIM, except the position and rotation parameters let you specify the initial position and rotation of the task.
Signature
void TASK_PLAY_ANIM_ADVANCED(Ped ped, char* animDictionary, char* animationName, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float blendInSpeed, float blendOutSpeed, int duration, Any flag, float animTime, Any p14, Any p15);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | The ped you want to play the animation |
animDictionary | char* | The animation dictionary |
animationName | char* | The animation name |
posX | float | Initial X position of the task |
posY | float | Initial Y position of the task |
posZ | float | Initial Z position of the task |
rotX | float | Initial X rotation of the task |
rotY | float | Initial Y rotation of the task |
rotZ | float | Initial Z rotation of the task |
blendInSpeed | 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 |
blendOutSpeed | 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 |
duration | int | The duration of the animation in milliseconds. -1 will play the animation until canceled |
flag | Any | |
animTime | float | Value between 0.0 and 1.0, lets you start an animation from the given point |
p14 | Any | — |
p15 | Any | — |
Returns void
Description
Similar in functionality to TASK_PLAY_ANIM, 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
This is the server-side RPC native equivalent of the client native TASK_PLAY_ANIM_ADVANCED.
Usage
TaskPlayAnimAdvanced(ped, animDictionary, animationName, posX, posY, posZ, rotX, rotY, rotZ, blendInSpeed, blendOutSpeed, duration, flag, animTime, p14, p15)
-- always works, by hash
Citizen.InvokeNative(0x3ddeb0e6, ped, animDictionary, animationName, posX, posY, posZ, rotX, rotY, rotZ, blendInSpeed, blendOutSpeed, duration, flag, animTime, p14, p15)JavaScript and C#
TaskPlayAnimAdvanced(ped, animDictionary, animationName, posX, posY, posZ, rotX, rotY, rotZ, blendInSpeed, blendOutSpeed, duration, flag, animTime, p14, p15);
// by hash
Citizen.invokeNative('0x3ddeb0e6', ped, animDictionary, animationName, posX + 0.0000001, posY + 0.0000001, posZ + 0.0000001, rotX + 0.0000001, rotY + 0.0000001, rotZ + 0.0000001, blendInSpeed + 0.0000001, blendOutSpeed + 0.0000001, duration, flag, animTime + 0.0000001, p14, p15);Function.Call((Hash)0x3ddeb0e6, ped, animDictionary, animationName, posX, posY, posZ, rotX, rotY, rotZ, blendInSpeed, blendOutSpeed, duration, flag, animTime, p14, p15);- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.