18.04.2012, 17:35
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?
//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;
}