PDA

View Full Version : running problem


samp_boy
17/03/2014, 08:10 PM
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)
{

Abagail
17/03/2014, 08:38 PM
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);
}
}
}

samp_boy
17/03/2014, 09:23 PM
Omg Now Zombies Keep Runing Without that i Press SPRINT Omgggg help

Raisingz
17/03/2014, 09:57 PM
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);