Animation doesn't stop after 25 seconds -
IndependentGaming - 01.04.2018
Hello, I'm trying to add a walking animation on register it works like this:
Код:
ApplyAnimation(playerid, "PED", "WALK_gang2", 4.0, 1, 1, 1, 1, 25000, 1);
But then it just keeps walking.
if I changed it to:
Код:
ApplyAnimation(playerid, "PED", "WALK_gang2", 4.0, 0, 1, 1, 1, 25000, 1);
then it just freezes after 1 step:
Re: Animation doesn't stop after 25 seconds -
Mugala - 01.04.2018
well, I'll create a code in a shortly.
Re: Animation doesn't stop after 25 seconds -
Mugala - 01.04.2018
use ApplyAnimationEx, instead of ApplyAnimation.
PHP код:
stock ApplyAnimationEx(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
{
ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync);
SetTimerEx("ClearAnims",time,0,"i",playerid);
}
forward ClearAnims(playerid);
public ClearAnims(playerid)
{
ClearAnimations(playerid);
return 1;
}
Re: Animation doesn't stop after 25 seconds -
IndependentGaming - 01.04.2018
Quote:
Originally Posted by Mugala
use ApplyAnimationEx, instead of ApplyAnimation.
PHP код:
stock ApplyAnimationEx(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
{
ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync);
SetTimerEx("ClearAnims",time,0,"i",playerid);
}
forward ClearAnims(playerid);
public ClearAnims(playerid)
{
ClearAnimations(playerid);
return 1;
}
|
Thankyou, so now I to this:
PHP код:
ApplyAnimation(playerid, "PED", "WALK_gang2", 4.0, 1, 1, 1, 1, 1, 1);
SetTimerEx("ClearAnims",25000,0,"i",playerid);
?
Re: Animation doesn't stop after 25 seconds -
Mugala - 01.04.2018
no, only use ApplyAnimationEx, these 2 code will be called automatically.
Re: Animation doesn't stop after 25 seconds -
IndependentGaming - 01.04.2018
Quote:
Originally Posted by Mugala
no, only use ApplyAnimationEx, these 2 code will be called automatically.
|
Can you make a example maybe ?
how do I apply "PED", "WALK_gang2" to ApplyAnimationEx ?
Re: Animation doesn't stop after 25 seconds -
Mugala - 01.04.2018
ApplyAnimationEx(playerid, "PED", "WALK_gang2", 4.0, 0, 1, 1, 1, 25000, 1);