SA-MP Forums Archive
Chat animation freezes player - 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: Chat animation freezes player (/showthread.php?tid=177384)



Chat animation freezes player - Thomas. - 17.09.2010

Hi all,

When applying the chat animation ("IDLE_CHAT") to a player, the player get's frozen no matter how I set the parameters of the ApplyAnimation function.

Currently I have this:

pawn Код:
ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.0, 0, 1, 1, 0, anim_time, 0);
(anim_time is set to an integer)

What could be the problem?

Thomas


Re: Chat animation freezes player - Vince - 17.09.2010

Well, you have set LockX and LockY to 1 (true). So then it makes perfect sense.


Re: Chat animation freezes player - Thomas. - 17.09.2010

The problem still persists after setting those parameters to 0


Re: Chat animation freezes player - Thomas. - 19.09.2010

....Bump


Re: Chat animation freezes player - Dime - 19.09.2010

ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,1,1,1,1,1);

try


Re: Chat animation freezes player - Mauzen - 19.09.2010

Use ClearAnimations afterwards when the animation is finished, it should unfreeze the player for sure, no matter what params you have,


Re: Chat animation freezes player - Thomas. - 19.09.2010

Quote:
Originally Posted by oттo
Посмотреть сообщение
ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,1,1,1,1,1);

try
Thanks for your reply, but I don't really want it to loop.
anim_time (in my example) is set to a different integer every time which I want to apply to the animation.

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Use ClearAnimations afterwards when the animation is finished, it should unfreeze the player for sure, no matter what params you have,
Actually, the problem is that the player freezes during the animation, not after it finishes (everything is fine again after it).

I'm looking for a way to make the players be able to walk during the animation.


Re: Chat animation freezes player - Thomas. - 19.09.2010

Anybody an idea?


Re: Chat animation freezes player - wups - 19.09.2010

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 );
}
I use this


Re: Chat animation freezes player - Thomas. - 19.09.2010

I'm not sure if that would really solve the problem, I mean, I only need one animation which shouldn't freeze the player.


Re: Chat animation freezes player - wups - 19.09.2010

try it first!


Re: Chat animation freezes player - Mike_Peterson - 19.09.2010

Code:
ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,1,1,1,anim_time,1);
this is just otto's one with anim_time


Re: Chat animation freezes player - Thomas. - 19.09.2010

Quote:
Originally Posted by wups
View Post
try it first!
Unfortunately, the problem still exists.

Quote:
Originally Posted by Mike_Peterson
View Post
Code:
ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,1,1,1,anim_time,1);
this is just otto's one with anim_time
Sorry, this didn't do much good either.


Re: Chat animation freezes player - Thomas. - 20.09.2010

Another bump


Re: Chat animation freezes player - Lewwy - 20.09.2010

pawn Code:
ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.0, 0, 0, 0, 0, 0, 1); // onplayertext or whatever
SetTimerEx("StopChat", 1000, false, "i", playerid);

forward StopChat(playerid); // bottom of your script
public StopChat(playerid)
{
     return ClearAnimations(playerid);
}
Works for sure, used to be on my server. I know it's not efficient, this code is from a really old script when my code wasn't really efficient at all.
I know it's too much code for one line, but it works.


Re: Chat animation freezes player - Thomas. - 20.09.2010

It appears that your code doesn't solve the problem either.

So I'm kind of stuck here, nothing really seems to work...


Re: Chat animation freezes player - Mike_Peterson - 20.09.2010

maybe something is blocking it in ur script, i saw alot of things that did worked to me...
Maybe try other animation... there are anims who are same but other name..


Re: Chat animation freezes player - Thomas. - 20.09.2010

Yeah, I did notice some other chat animation; "Idle_Chat_02"

I'm not sure if there is any difference, but I'll try it with that.


Re: Chat animation freezes player - Thomas. - 20.09.2010

Same results.

I can't imagine anything in the script that would cause this problem either...

Any other ideas?