Applyanimation on chat
#2

top of script
pawn Код:
forward StopTalk(playerid);
new gPlayerUsingLoopingAnim[MAX_PLAYERS];
somewhere in your script
pawn Код:
StopLoopingAnim(playerid)
{
    gPlayerUsingLoopingAnim[playerid] = 0;
    ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
}

public OnPlayerText(playerid,text[])
{
    ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.0, 0, 1, 1, 1, strlen(text)*1000, 1);
    SetTimer("StopTalk", strlen(text)*200, false); // CHANGE THE 200 IF YOU WANT THE ANIM TO LAST LONGER
    return 1;
}

public StopTalk(playerid)
{
    ClearAnimations(playerid);
    StopLoopingAnim(playerid);
   
    return 1;
}
PS: weard, I thaught this was already answered yesterday
Reply


Messages In This Thread
Applyanimation on chat - by 01 - 11.01.2011, 07:06
Re: Applyanimation on chat - by Rizard - 11.01.2011, 11:10

Forum Jump:


Users browsing this thread: 1 Guest(s)