Farming script Anim Error Pls help :/

in my Farmingscript is the anim not working can you please help me ?
ps: sorry for my english :smiley:

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(10)
		if CurrentAction ~= nil then
			ESX.ShowHelpNotification(CurrentActionMsg)

			if IsControlJustReleased(0, Keys['E']) and IsPedOnFoot(PlayerPedId()) then
				if CurrentAction == 'BirnenSammler' then
					TriggerServerEvent('esx_birne:startHarvestKoda')
					TaskPlayAnim(PlayerPedId(), "anim@mp_snowball", "pickup_snowball", 8.0, -8.0, -1, 0, 0, false, false, false)
				elseif CurrentAction == 'BirnenVerarbeiter' then
					TriggerServerEvent('esx_birne:startTransformKoda')
				elseif CurrentAction == 'BirnenVerkaeufer' then
					TriggerServerEvent('esx_birne:startSellKoda')
				end

Hello, you have to load the animDict before using it.

RequestAnimDict("anim@mp_snowball")
while not HasAnimDictLoaded("anim@mp_snowball") do
    Wait(0)
end
TaskPlayAnim(PlayerPedId(), "anim@mp_snowball", "pickup_snowball", 8.0, -8.0, -1, 0, 0, false, false, false)
1 Like

Thank You !!!

You’re welcome :slight_smile: