Chat anim while walking.
#1

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);
Reply
#2

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.
Reply
#3

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.
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)