From 0fbff1fb804b2a1089c56f3c3319721ff90d9feb Mon Sep 17 00:00:00 2001 From: M1L70N Date: Mon, 14 Oct 2024 00:26:42 -0300 Subject: [PATCH] =?UTF-8?q?Adiciona=20anima=C3=A7=C3=A3o=20ao=20interagir?= =?UTF-8?q?=20com=20a=20ab=C3=B3bora.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implementada uma nova animação ao coletar abóboras no jogo. A animação é acionada quando o jogador interage com a abóbora. --- server/main.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/main.lua b/server/main.lua index 81fec34..e82b0c4 100644 --- a/server/main.lua +++ b/server/main.lua @@ -49,6 +49,20 @@ AddEventHandler("Pumpkin:Collect", function() local Valuation = math.random(1, 3) if (selectedFunctions[2](Passport) + ItemWeight(prize) * Valuation) <= selectedFunctions[3](Passport) then + + local animDict = "anim@scripted@player@freemode@tun_prep_ig1_grab_low@heeled@" + local animName = "grab_low" + + RequestAnimDict(animDict) + while not HasAnimDictLoaded(animDict) do + RequestAnimDict(animDict) + Wait(50) + end + + TaskPlayAnim(source, animDict, animName, 8.0, -8.0, -1, 49, 0, false, false, false) + + Wait(500) + selectedFunctions[4](Passport, prize, Valuation, true) table.insert(collectedItems, prize) else