Check animation exists

This commit is contained in:
Vortrex
2023-02-12 13:10:56 -06:00
parent 734446c4f0
commit afce71dd19

View File

@@ -29,6 +29,12 @@ function playPlayerAnimationCommand(command, params, client) {
return false;
}
if (!getAnimationData(animationSlot)) {
messagePlayerError(client, getLocaleString(client, "InvalidAnimation"));
messagePlayerInfo(client, getLocaleString(client, "AnimationCommandTip", `{ALTCOLOUR}/animlist{MAINCOLOUR}`));
return false;
}
if (toInteger(animationPositionOffset) < 0 || toInteger(animationPositionOffset) > 3) {
messagePlayerError(client, getLocaleString(client, "InvalidAnimationDistance"));
return false;