open #16
This commit is contained in:
@@ -106,16 +106,17 @@ export default function animationSync() {
|
|||||||
loadAnimDict(animDict, function () {
|
loadAnimDict(animDict, function () {
|
||||||
mp.players.exists(entity) && 0 !== entity.handle && entity.taskPlayAnim(animDict, animName, 1, 0, duration, parseInt(flag), 0, !1, !1, !1)
|
mp.players.exists(entity) && 0 !== entity.handle && entity.taskPlayAnim(animDict, animName, 1, 0, duration, parseInt(flag), 0, !1, !1, !1)
|
||||||
});
|
});
|
||||||
if (!endless) {
|
|
||||||
animationBreakTimer = setInterval(() => breakAnimation(name), 120000);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mp.players.local == entity) {
|
if (mp.players.local == entity) {
|
||||||
|
if (!endless) {
|
||||||
|
animationBreakTimer = setInterval(() => breakAnimation(name), 120000);
|
||||||
|
}
|
||||||
|
|
||||||
if (!loop) {
|
if (!loop) {
|
||||||
let a = setInterval(function () {
|
let a = setInterval(function () {
|
||||||
mp.events.callRemote("CLIENT:ClearAnimationData", true);
|
|
||||||
|
|
||||||
clearInterval(a);
|
clearInterval(a);
|
||||||
|
mp.game.wait(500);
|
||||||
|
mp.events.callRemote("CLIENT:ClearAnimationData", true);
|
||||||
}, duration);
|
}, duration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,8 +64,6 @@ namespace ReallifeGamemode.Server.Util
|
|||||||
/// <param name="animationName">Name of requested animation</param>
|
/// <param name="animationName">Name of requested animation</param>
|
||||||
public static bool HasAnimation(this Player player, dynamic animationName)
|
public static bool HasAnimation(this Player player, dynamic animationName)
|
||||||
{
|
{
|
||||||
string data = player.GetData<string>("Animation");
|
|
||||||
bool x = player.GetData<string>("Animation") == animationName;
|
|
||||||
return player.HasData("Animation") && (player.GetData<string>("Animation") == animationName);
|
return player.HasData("Animation") && (player.GetData<string>("Animation") == animationName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +72,6 @@ namespace ReallifeGamemode.Server.Util
|
|||||||
if (!player.HasData("Animation"))
|
if (!player.HasData("Animation"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
player.ClearAttachments();
|
|
||||||
player.ResetData("Animation");
|
player.ResetData("Animation");
|
||||||
player.ResetSharedData("AnimationData");
|
player.ResetSharedData("AnimationData");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user