natives.taskPlayAnimNonInterruptable
Function Client Only ![]()
Online and Offline
Available since Client 1.0.0
void natives.taskPlayAnimNonInterruptable(object ped, string animName, string animGroup, float speed, int flag1, int flag2, int flag3, int flag4, int unknown)
The natives.taskPlayAnimNonInterruptable function is used to Play a non-interruptable animation on a ped.
Parameters
| 1) | object | ped | The handle of the ped. |
| 2) | string | animName | The animation's name (e.g. "crim_searched"). |
| 3) | string | animGroup | The animation set/group name (e.g. "cop"). |
| 4) | float | speed | Playback speed multiplier. |
| 5) | int | flag1 | First animation flag. |
| 6) | int | flag2 | Second animation flag. |
| 7) | int | flag3 | Third animation flag. |
| 8) | int | flag4 | Fourth animation flag. |
| 9) | int | unknown | Always -1. |
Return
| void | This function doesn't return a value. |
Notes
- * **Flag 1** – Loops the animation infinitely.* **Flag 2** – Loops the animation infinitely, disables player movement but not player control.* **Flag 3** – If set to false (0), the player is returned to their old coordinate once the animation is complete (for animations that move the player such as walking). True (1) will not return them to their old position.* **Flag 4** – Freezes the last frame of the animation.
Examples
Example 1 - JavaScript:
addCommandHandler("cuffanim", function(command, params, client) {
natives.requestAnims("cop");
natives.taskPlayAnimNonInterruptable(localPlayer, "crim_searched", "cop", 8.0, 0, 0, 0, 1, -1);
});
Compatibility
There isn't any compatibility information for this function.