disable attack on animation
This commit is contained in:
@@ -62,6 +62,8 @@ export default function animationSync() {
|
||||
loadAnimDict(animDict, function () {
|
||||
mp.players.exists(player) && 0 !== player.handle && player.taskPlayAnim(animDict, animName, 8, 1, duration, parseInt(flag), 0, !1, !1, !1)
|
||||
});
|
||||
if (player == mp.players.local)
|
||||
mp.game.controls.disableControlAction(32, 24, true);
|
||||
}
|
||||
});
|
||||
}, 100);
|
||||
@@ -69,6 +71,9 @@ export default function animationSync() {
|
||||
mp.events.addDataHandler("AnimationData", (entity: PlayerMp, string) => {
|
||||
entity.clearTasksImmediately();
|
||||
|
||||
if (entity == mp.players.local)
|
||||
mp.game.controls.disableControlAction(32, 24, false);
|
||||
|
||||
if (string == null) {
|
||||
return;
|
||||
}
|
||||
@@ -85,6 +90,9 @@ export default function animationSync() {
|
||||
mp.players.exists(entity) && 0 !== entity.handle && entity.taskPlayAnim(animDict, animName, 8, 1, duration, parseInt(flag), 0, !1, !1, !1)
|
||||
});
|
||||
|
||||
if (entity == mp.players.local)
|
||||
mp.game.controls.disableControlAction(32, 24, true);
|
||||
|
||||
let pair = pairData.find(pair => pair.from == string);
|
||||
if (!pair)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user