Chat anim -
Sergei - 14.07.2009
Hello.
I made a simple thing which apply you a chat anim when you talk.
pawn Код:
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,1,0,0,1,time);
SetTimerEx("StopTalk", time, false, "i", playerid);
public StopTalk(playerid)
{
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
return 1;
}
The problem is next. If I use SetTimer to stop anim, it only works for player ID 0, but anim doesn't stop for other players. If I use SetTimerEx it works for all the players, but you stay frozen until anim ends. I tried changing opt4 to 0 and 1 multiple times, also tried with loop and without and it's always the same; frozen until anim ends.
Basically I tried all these options:
pawn Код:
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,1,0,0,1,time);
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,1,0,0,1,time);
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0);
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,time);
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,1,0);
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,1,0,0,0,0);
With SetTimer it stops only for ID 0 and oyu can move while doing animation, but with SettimerEx it stops for all palyers, but oyu can't move while doing animation.
I need that it stops for all the players and you can mvoe while doing animation.
Re: Chat anim -
MenaceX^ - 14.07.2009
I didn't read the topic but by your topic name I think I know what you want.
An animation appears as the player speaks, the animation has as same letnght as the chat.
Am I right?
Re: Chat anim -
Sergei - 14.07.2009
Animation uses this lenght
The problem is only with stopping animation as I said. If I use SetTimerEx it freezes me until animation is stopped, but if I use SetTimer it doesn't stop for all players.
Re: Chat anim -
dice7 - 14.07.2009
Try playing this animation when you want the chat one to stop
pawn Код:
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
Re: Chat anim -
MenaceX^ - 14.07.2009
Use strlen(text) on the animation, as its time.
Re: Chat anim -
pen_theGun - 14.07.2009
pawn Код:
public StopTalk(playerid)
{
ClearAnimations(playerid);
return 1;
}
Re: Chat anim -
Sergei - 14.07.2009
It works now. Solution is next:
pawn Код:
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,1,1);