Example Use in C#:
public static async void PlayClipset(string dict, string anim, int flag, int duration = -1)
{
// PlayClipset("mech_loco_m@generic@reaction@handsup@unarmed@tough", "loop", 31);
// https://rdr2.mooshe.tv/animations/
API.RequestAnimDict(dict);
while (!API.HasAnimDictLoaded(dict))
{
await BaseScript.Delay(100);
}
if (API.IsEntityPlayingAnim(API.PlayerPedId(), dict, anim, 3))
API.ClearPedSecondaryTask(API.PlayerPedId());
else
Function.Call(Hash.TASK_PLAY_ANIM, API.PlayerPedId(), dict, anim, 1.0f, 8.0f, duration, flag, 0, true, 0, false, 0, false);
}