This commit is contained in:
2021-04-06 21:19:44 +02:00
parent b993485906
commit be78edd912
5 changed files with 73 additions and 24 deletions

View File

@@ -50,9 +50,14 @@
setInterval(() => {
if (mp.players.local.getVariable("AnimationData")) {
blockInput = true;
} else {
blockInput = false;
let index = mp.game.joaat(mp.players.local.getVariable("AnimationData"));
let currentAnim = animationSyncData.animations[index];
let { id, name, animDict, animName, duration, loop, flag } = currentAnim;
if (loop) {
blockInput = true;
} else {
blockInput = false;
}
}
mp.players.forEachInStreamRange(
@@ -69,13 +74,6 @@
loadAnimDict(animDict, function () {
mp.players.exists(player) && 0 !== player.handle && player.taskPlayAnim(animDict, animName, 1, 0, duration, parseInt(flag), 0, !1, !1, !1)
});
} else if (!loop) {
let a = setInterval(function () {
if (player == mp.players.local) {
mp.events.callRemote("CLIENT:ClearAnimationData", player);
}
clearInterval(a);
}, duration);
}
});
}, 100);