From ba2eb26788bd4852a5cae07d48ba47e0bc2f77e9 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Thu, 7 Apr 2022 04:52:54 -0500 Subject: [PATCH] Rename anim locale strings to match other types --- locale/arabic.json | 4 ++-- locale/chinese.json | 4 ++-- locale/english.json | 4 ++-- locale/polish.json | 4 ++-- locale/russian.json | 4 ++-- locale/slovak.json | 4 ++-- locale/spanish.json | 4 ++-- scripts/server/animation.js | 8 ++++---- scripts/server/client.js | 4 ++++ 9 files changed, 22 insertions(+), 18 deletions(-) diff --git a/locale/arabic.json b/locale/arabic.json index e510941b..05a1669a 100644 --- a/locale/arabic.json +++ b/locale/arabic.json @@ -11,9 +11,9 @@ "HeaderHelpMainList": "فئة الدعم", "AccentNotFound": "اللكنة الحالية غير متوفرة", "AccentSet": "قمت بتعيين لهجتك على {1}", - "AnimationNotFound": "هذه الرسوم المتحركة غير متوفرة", + "InvalidAnimation": "هذه الرسوم المتحركة غير متوفرة", "AnimationCommandTip": "استخدم {1} لمشاهدة قائمة الرسوم المتحركة المتاحة", - "AnimationInvalidDistance": "يجب المسافة تكون بين 0 و 3", + "InvalidAnimationDistance": "يجب المسافة تكون بين 0 و 3", "AnimationStopCommandTip": "استخدم {1} لإيقاف الرسوم المتحركة", "CantBanClient": "لا يمكنك حظر هذا الإعب", "PlayerAccountBanned": "تم حظر حساب {1}", diff --git a/locale/chinese.json b/locale/chinese.json index 8918100f..be89deed 100644 --- a/locale/chinese.json +++ b/locale/chinese.json @@ -10,9 +10,9 @@ "HeaderHelpMainList": "帮助类别", "AccentNotFound": "口音不存在", "AccentSet": " 口音已设置为 {1}", - "AnimationNotFound": "该动作不存在", + "InvalidAnimation": "该动作不存在", "AnimationCommandTip": "使用 {1} 以查看可用动作列表", - "AnimationInvalidDistance": "范围必须在 0 到 3 之间", + "InvalidAnimationDistance": "范围必须在 0 到 3 之间", "AnimationStopCommandTip": "使用 {1} 以停止当前动作", "CantBanClient": "你无法封禁该玩家", "PlayerAccountBanned": "{1} 的账号已被封禁", diff --git a/locale/english.json b/locale/english.json index 7c8e4e31..0de91252 100644 --- a/locale/english.json +++ b/locale/english.json @@ -11,9 +11,9 @@ "HeaderHelpMainList": "Help Categories", "AccentNotFound": "Accent not found", "AccentSet": "You set your accent to {1}", - "AnimationNotFound": "That animation doesn't exist", + "InvalidAnimation": "That animation doesn't exist", "AnimationCommandTip": "Use {1} to see a list of valid animations", - "AnimationInvalidDistance": "The distance must be between 0 and 3", + "InvalidAnimationDistance": "The distance must be between 0 and 3", "AnimationStopCommandTip": "Use {1} to stop your animation", "CantBanClient": "You cannot ban this person", "PlayerAccountBanned": "{1} has been account banned", diff --git a/locale/polish.json b/locale/polish.json index 5cc8e12d..717619e8 100644 --- a/locale/polish.json +++ b/locale/polish.json @@ -11,9 +11,9 @@ "HeaderHelpMainList": "Pomoc - Kategorie", "AccentNotFound": "Akcent nie znaleziony", "AccentSet": "Ustawiłeś swój akcent na {1}", - "AnimationNotFound": "Ta animcja nie istnieje", + "InvalidAnimation": "Ta animcja nie istnieje", "AnimationCommandTip": "Użyj {1} aby zobaczyć listę działających animacji", - "AnimationInvalidDistance": "Dystans musi być między 0 i 3", + "InvalidAnimationDistance": "Dystans musi być między 0 i 3", "AnimationStopCommandTip": "Użyj {1} aby zatrzymać swoją animacje", "CantBanClient": "Nie możesz zbanować tej osoby", "PlayerAccountBanned": "{1} został zbanowany", diff --git a/locale/russian.json b/locale/russian.json index 9544b951..c760909b 100644 --- a/locale/russian.json +++ b/locale/russian.json @@ -11,9 +11,9 @@ "HeaderHelpMainList": "Помощь Категории", "AccentNotFound": "Не удалось найти акцент", "AccentSet": "Вы установили свой акцент на {1}", - "AnimationNotFound": "Такой анимации не существует", + "InvalidAnimation": "Такой анимации не существует", "AnimationCommandTip": "Используйте {1} чтобы просмотреть список доступных анимаций", - "AnimationInvalidDistance": "Дистанция должна быть между 0 и 3", + "InvalidAnimationDistance": "Дистанция должна быть между 0 и 3", "AnimationStopCommandTip": "Используйте {1} чтобы остановить анимацию", "CantBanClient": "Вы не можете забанить этого игрока", "PlayerAccountBanned": "Аккаунт {1} был заблокирован ", diff --git a/locale/slovak.json b/locale/slovak.json index dbe2d0ef..019816a5 100644 --- a/locale/slovak.json +++ b/locale/slovak.json @@ -11,9 +11,9 @@ "HeaderHelpMainList": "Help Categories", "AccentNotFound": "Accent not found", "AccentSet": "You set your accent to {1}", - "AnimationNotFound": "That animation doesn't exist", + "InvalidAnimation": "That animation doesn't exist", "AnimationCommandTip": "Use {1} to see a list of valid animations", - "AnimationInvalidDistance": "The distance must be between 0 and 3", + "InvalidAnimationDistance": "The distance must be between 0 and 3", "AnimationStopCommandTip": "Use {1} to stop your animation", "CantBanClient": "You cannot ban this person", "PlayerAccountBanned": "{1} has been account banned", diff --git a/locale/spanish.json b/locale/spanish.json index 72bfb50c..19a83391 100644 --- a/locale/spanish.json +++ b/locale/spanish.json @@ -17,9 +17,9 @@ "HelpAnimationHeader": "Ayuda de animaciones", "AccentNotFound": "Acento no encontrado", "AccentSet": "Acento establecido como {1}", - "AnimationNotFound": "Esa animación no existe", + "InvalidAnimation": "Esa animación no existe", "AnimationCommandTip": "Usa {1} para ver la lista de animaciones", - "AnimationInvalidDistance": "La distancia debe ser un numero entre el 0 y el 3", + "InvalidAnimationDistance": "La distancia debe ser un numero entre el 0 y el 3", "AnimationStopCommandTip": "Usa {1} para detener la animación actual", "CantBanClient": "No se puede vetar a esta persona", "PlayerAccountBanned": "La cuenta de {1} ha sido vetada", diff --git a/scripts/server/animation.js b/scripts/server/animation.js index 86556bb0..cf68b0bc 100644 --- a/scripts/server/animation.js +++ b/scripts/server/animation.js @@ -20,17 +20,17 @@ function playPlayerAnimationCommand(command, params, client) { return false; } -let animationSlot = getAnimationFromParams(getParam(params, " ", 1)); + let animationSlot = getAnimationFromParams(getParam(params, " ", 1)); let animationPositionOffset = 1; if(!animationSlot) { - messagePlayerError(client, getLocaleString(client, "AnimationNotFound")); + messagePlayerError(client, getLocaleString(client, "InvalidAnimation")); messagePlayerInfo(client, getLocaleString(client, "AnimationHelpTip"), `{ALTCOLOUR}/animlist{MAINCOLOUR}`); return false; } if(toInteger(animationPositionOffset) < 0 || toInteger(animationPositionOffset) > 3) { - messagePlayerError(client, getLocaleString(client, "AnimationInvalidDistance")); + messagePlayerError(client, getLocaleString(client, "InvalidAnimationDistance")); return false; } @@ -107,7 +107,7 @@ function makePlayerPlayAnimation(client, animationSlot, offsetPosition = 1) { getPlayerData(client).animationForced = false; makePedPlayAnimation(getPlayerData(client).ped, animationSlot, offsetPosition); - + setEntityData(ped, "vrr.anim", [animationData[1], animationData[2]]); //if(getAnimationData(animationSlot)[9] != VRR_ANIMMOVE_NONE) { // if(getGame() < VRR_GAME_GTA_SA) { // setPlayerMouseCameraState(client, true); diff --git a/scripts/server/client.js b/scripts/server/client.js index 3cb6cc8a..6e4611db 100644 --- a/scripts/server/client.js +++ b/scripts/server/client.js @@ -1016,12 +1016,15 @@ function makePedPlayAnimation(ped, animationSlot, positionOffset) { break; } //} + + setEntityData(ped, "vrr.animation", animationData[1], animationData[2]); sendNetworkEventToPlayer("vrr.pedAnim", null, ped.id, animationData[1], animationData[2], animationData[3], animationData[4], animationData[5], positionOffset, freezePlayer); } // =========================================================================== function makePedStopAnimation(pedId) { + removeEntityData(ped, "vrr.animation"); sendNetworkEventToPlayer("vrr.pedStopAnim", null, pedId); } @@ -1030,6 +1033,7 @@ function makePedStopAnimation(pedId) { function forcePedAnimation(ped, animationSlot) { let animationData = getAnimationData(animationSlot); + removeEntityData(ped, "vrr.animation", animationData[1], animationData[2]); sendNetworkEventToPlayer("vrr.forcePedAnim", null, ped.id, animationData[1], animationData[2], animationData[3], animationData[4]); }