Chat anim while walking. -
PaulDinam - 11.03.2013
How can I make this to work when player walks?
because it freezes the player for a few seconds
pawn Код:
new lengthtime = strlen(text);
new time = lengthtime*50;
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,time);
Re: Chat anim while walking. -
MP2 - 11.03.2013
Just grabbed this from an old GM of mine, hopefully you'll understand it:
pawn Код:
if(isnull(params))
{
SendClientMessageEx(playerid, COLOR_TEAL, "Type /TALK [0-3] for different settings.");
SendClientMessageEx(playerid, COLOR_TEAL, "/talk 0 - Single animation, frozen.");
SendClientMessageEx(playerid, COLOR_TEAL, "/talk 1 - Single animation, not frozen.");
SendClientMessageEx(playerid, COLOR_TEAL, "/talk 2 - Looped animation, frozen.");
SendClientMessageEx(playerid, COLOR_TEAL, "/talk 3 - Looped animation, not frozen.");
return ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,0,1,1,0,0);
}
switch(strval(params))
{
case 0: ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,0,1,1,0,0);
case 1: ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,0,0,0,1,1);
case 2:
{
ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,1,1,1,0,0);
pAnimating[playerid] = ANIM_PED;
}
case 3:
{
ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,1,1,1,1,1);
pAnimating[playerid] = ANIM_PED;
}
}
Take what you need.
Re: Chat anim while walking. -
PaulDinam - 12.03.2013
I made a stock:
pawn Код:
stock ChatAnimation(playerid, length)
{
new time = length*200;
OnPlayAnim(playerid, "PED", "IDLE_CHAT",4.1,0,0,0,1,1);
SetTimerEx("TalkTimer", time, 0, "i", playerid);
}
A timer is good? and I can walk while the animation is on.
Re: Chat anim while walking. -
Norrin - 20.12.2013
Quote:
Originally Posted by MP2
Just grabbed this from an old GM of mine, hopefully you'll understand it:
pawn Код:
if(isnull(params)) { SendClientMessageEx(playerid, COLOR_TEAL, "Type /TALK [0-3] for different settings."); SendClientMessageEx(playerid, COLOR_TEAL, "/talk 0 - Single animation, frozen."); SendClientMessageEx(playerid, COLOR_TEAL, "/talk 1 - Single animation, not frozen."); SendClientMessageEx(playerid, COLOR_TEAL, "/talk 2 - Looped animation, frozen."); SendClientMessageEx(playerid, COLOR_TEAL, "/talk 3 - Looped animation, not frozen."); return ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,0,1,1,0,0); } switch(strval(params)) { case 0: ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,0,1,1,0,0); case 1: ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,0,0,0,1,1); case 2: { ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,1,1,1,0,0); pAnimating[playerid] = ANIM_PED; } case 3: { ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,1,1,1,1,1); pAnimating[playerid] = ANIM_PED; } }
Take what you need.
|
Worked, thanks.
+Rep