This commit is contained in:
2021-04-06 21:57:28 +02:00
parent 822af9c06b
commit 0ea74f1b20

View File

@@ -20,6 +20,7 @@ namespace ReallifeGamemode.Server.Util
return; return;
player.SetSharedData("AnimationData", newAnimation); player.SetSharedData("AnimationData", newAnimation);
player.SetData<string>("Animation", newAnimation);
} }
/// <summary>Check if Player has any Animation playing. /// <summary>Check if Player has any Animation playing.
@@ -35,7 +36,7 @@ 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)
{ {
return player.HasData("Animation") && (player.GetData<string>("AnimationData") == animationName); return player.HasData("Animation") && (player.GetData<string>("Animation") == animationName);
} }
public static void ClearAnimation(this Player player) public static void ClearAnimation(this Player player)