Skip to content

Commit

Permalink
Adiciona animação ao interagir com a abóbora.
Browse files Browse the repository at this point in the history
Implementada uma nova animação ao coletar abóboras no jogo.
A animação é acionada quando o jogador interage com a abóbora.
  • Loading branch information
MASQUEICOJR committed Oct 14, 2024
1 parent 6f285af commit 0fbff1f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0fbff1f

Please sign in to comment.