SA-MP Forums Archive
Applyanimation on chat - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Applyanimation on chat (/showthread.php?tid=209706)



Applyanimation on chat - 01 - 11.01.2011

Can u guys help me? I have no idea how to do this


I am trying to make a chat animation when my people talks.

but doesnt understand aboy applyanimation..

can u help me/make it for me?


Re: Applyanimation on chat - Rizard - 11.01.2011

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