SA-MP Forums Archive
talk anim - 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)
+--- Thread: talk anim (/showthread.php?tid=335499)



talk anim - Gooday - 18.04.2012

How to do like a lot of servers aka, you type in the chat and the players has a chat animation for 2 or 3 secs?


Re: talk anim - Jonny5 - 18.04.2012

use this function to apply them
https://sampwiki.blast.hk/wiki/ApplyAnimation


and you can look for the anim here
https://sampwiki.blast.hk/wiki/Animations


Re: talk anim - ViniBorn - 18.04.2012

I found this code

pawn Код:
//OnPlayerText

new AnimR = random(1);
if(AnimR == 0 && !IsPlayerInAnyVehicle(playerid))
{
    ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.0, 1, 0, 0, 1, 1);
    SetTimerEx("SpeakAnim", strlen(text)*200, false, "i", playerid);
}
else if(AnimR == 1 && !IsPlayerInAnyVehicle(playerid))
{
    ApplyAnimation(playerid, "PED", "Idle_Chat_02", 4.0, 1, 0, 0, 1, 1);
    SetTimerEx("SpeakAnim", strlen(text)*200, false, "i", playerid);
}

public SpeakAnim(playerid)
{
    ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
    return 1;
}