SA-MP Forums Archive
running problem - 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: running problem (/showthread.php?tid=501372)



running problem - samp_boy - 17.03.2014

i want to apply this Anim Once Zombies Runs:

ApplyAnimation(playerid,"MUSCULAR","MuscleSprint", 4.0,1,1,1,1,1);

Someone Can Help Me ?


it start like this:

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(PRESSED(KEY_SPRINT))
	{
 		if(team[playerid] == TEAM_ZOMBIE)
 		{



Re: running problem - Abagail - 17.03.2014

You were doing good... I don't see the issue in what you need help with but here it is:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_SPRINT))
{
if(team[playerid] == TEAM_ZOMBIE)
{
ApplyAnimation(playerid,"MUSCULAR","MuscleSprint", 4.0,1,1,1,1,1);
}
}
}


Re : running problem - samp_boy - 17.03.2014

Omg Now Zombies Keep Runing Without that i Press SPRINT Omgggg help


Re: Re : running problem - Raisingz - 17.03.2014

You need to change the "loop" parameter in ApplyAnimation to false. This should do the trick:
ApplyAnimation(playerid,"MUSCULAR","MuscleSprint", 4.0,0,0,0,1,1);

If you want the zombies to stay in the same place (Air run)
Do: ApplyAnimation(playerid,"MUSCULAR","MuscleSprint", 4.0,1,1,0,1,1);