SA-MP Forums Archive
Animation not playing - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Animation not playing (/showthread.php?tid=565756)



Animation not playing - _GHT_MarK445 - 01.03.2015

Hey guys,

i made a little script, when player is training his "logic" and everything works, even the training but after i write the command, to start the training, the animation is not showing up. Animation is showing just after i write the command second time, which is not, what i want.

The code:
Код:
CMD:logic(playerid, params[])
{
	#pragma unused params
	if(Training[playerid] == 1) return SendClientMessage(playerid, color, "You are already training.");
	Training1[playerid] = SetTimerEx("Logic", 60000, false, "i", playerid);
	Training[playerid] = 1;
	ApplyAnimation(playerid, "PARK", "Tai_Chi_Loop", 4.1, 1, 0, 0, 0, 60000, 1);
	SendClientMessage(playerid, colore, "You started the training, you will end at the minute.");
	return 1;
}
Thank you guys!


Re: Animation not playing - Runn3R - 01.03.2015

You'll need to preload those animations to have them actually work in the "first time".


Re: Animation not playing - _GHT_MarK445 - 01.03.2015

Well, and how i am enable to do this?


Re: Animation not playing - Runn3R - 01.03.2015

I think this will help:
https://sampforum.blast.hk/showthread.php?tid=265119


Re: Animation not playing - _GHT_MarK445 - 01.03.2015

Thanks, but isnt there some tutorial how to do it? I dont want to just copy it, but learn, how to preload it, that i can use it even in future. For example on wiki, i was not enable to find it.


Re: Animation not playing - Runn3R - 01.03.2015

It's a SA:MP sync bug. Just open the filescript and take a look at the code lol..