Animation doesn't stop after 25 seconds
#1

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:

Reply
#2

well, I'll create a code in a shortly.
Reply
#3

use ApplyAnimationEx, instead of ApplyAnimation.
PHP код:
stock ApplyAnimationEx(playeridanimlib[], animname[], Float:fDeltalooplockxlockyfreezetimeforcesync)
{
    
ApplyAnimation(playeridanimlibanimnamefDeltalooplockxlockyfreezetimeforcesync);
    
SetTimerEx("ClearAnims",time,0,"i",playerid);
}

forward ClearAnims(playerid);
public 
ClearAnims(playerid)
{
    
ClearAnimations(playerid);
    return 
1;

Reply
#4

Quote:
Originally Posted by Mugala
Посмотреть сообщение
use ApplyAnimationEx, instead of ApplyAnimation.
PHP код:
stock ApplyAnimationEx(playeridanimlib[], animname[], Float:fDeltalooplockxlockyfreezetimeforcesync)
{
    
ApplyAnimation(playeridanimlibanimnamefDeltalooplockxlockyfreezetimeforcesync);
    
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.0111111);
SetTimerEx("ClearAnims",25000,0,"i",playerid); 
?
Reply
#5

no, only use ApplyAnimationEx, these 2 code will be called automatically.
Reply
#6

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 ?
Reply
#7

ApplyAnimationEx(playerid, "PED", "WALK_gang2", 4.0, 0, 1, 1, 1, 25000, 1);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)