Chat animation
#1

Hello guys!

I wanted to ask you why player freezes while chatting?

pawn Код:
new Length = strlen(text);
    new aTime = Length*200;
    if(!IsPlayerInAnyVehicle(playerid) && !IsPlayerSitting(playerid))
    {
        ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,aTime);
    }
    else if(IsPlayerInAnyVehicle(playerid))
    {
        if(GetPlayerVehicleSeat(playerid) == 0) ApplyAnimation(playerid,"CAR_CHAT","CAR_SC3_FL",4,1,0,0,0,aTime,1);
        if(GetPlayerVehicleSeat(playerid) == 1) ApplyAnimation(playerid,"CAR_CHAT","CAR_SC3_FR",4,1,0,0,0,aTime,1);
        if(GetPlayerVehicleSeat(playerid) == 2) ApplyAnimation(playerid,"CAR_CHAT","CAR_SC1_BL",4,1,0,0,0,aTime,1);
        if(GetPlayerVehicleSeat(playerid) == 3) ApplyAnimation(playerid,"CAR_CHAT","CAR_SC3_BR",4,1,0,0,0,aTime,1);
    }
    else if(!IsPlayerInAnyVehicle(playerid))
    {
        ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,aTime);
    }
this is my OnPlayerText callback.
Reply
#2

pawn Код:
ApplyAnimation(playerid,"PED","IDLE_chat",4.1,0, 0, 0, 0, 0);

SetTimerEx("StopAnim", 1000, false, "i", playerid);

forward StopAnim(playerid);
public StopAnim(playerid)
{
    ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0 );
}
Try it
Reply
#3

No , he is not freezed after , everything is ok you can move , but he is freezed WHILE chatting.
Reply
#4

Quote:
Originally Posted by Dziugsas
Посмотреть сообщение
No , he is not freezed after , everything is ok you can move , but he is freezed WHILE chatting.
pawn Код:
ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.0, 0, 0, 0, 0, 0, 1);
SetTimerEx("StopChat", 1000, false, "i", playerid);

forward StopChat(playerid);
public StopChat(playerid)
{
     return ClearAnimations(playerid);
}
Reply
#5

Still freezes me while saying smth.
Reply
#6

Quote:
Originally Posted by Dziugsas
Посмотреть сообщение
Still freezes me while saying smth.
I do beleive the animation works like this, Other person couldn't solve it too
Reply
#7

No i made it to work while running but i dont remember how...Maybe you know...i thought.
Reply


Forum Jump:


Users browsing this thread: