Animation 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: Animation on chat (
/showthread.php?tid=126138)
Animation on chat -
Universal - 07.02.2010
Hello, i have one question... Today i tried to make an animation, when you type something in chat. And i get, player talks (moves hes hands...) and after that hes holding hes hands down, and when i try to run hes running like somekind of retard idiot. lol ( animation does not finishes...) how to make that ?
My callback:
Код:
public OnPlayerText(playerid, text[])
{
ApplyAnimation(playerid, "ped" , "IDLE_chat" , 4.0, 0, 1, 1, 1, 1000);
return 1;
}
Looking forward
Re: Animation on chat -
Stig - 07.02.2010
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("//blahblah", cmdtext, true,

== 0)
{
ApplyAnimation(playerid, "ped" , "IDLE_chat" , 4.0, 0, 1, 1, 1, 1000);
return 1;
}
Peace....
Re: Animation on chat -
Universal - 07.02.2010
Quote:
Originally Posted by Stig
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("//blahblah", cmdtext, true,  == 0)
{
ApplyAnimation(playerid, "ped" , "IDLE_chat" , 4.0, 0, 1, 1, 1, 1000);
return 1;
}
Peace....
|
No not the command, but when player talks, simply, without "/"... Its for role-play
Re: Animation on chat -
Stig - 07.02.2010
Sozz, i missunderstood
Peace...
Re: Animation on chat -
Universal - 07.02.2010
Quote:
Originally Posted by Stig
Sozz, i missunderstood
Peace...
|
No problem

So, any ideas?
Re: Animation on chat -
dice7 - 07.02.2010
Use a 2 second timer and use ClearAnimations
https://sampwiki.blast.hk/wiki/ClearAnimations
https://sampwiki.blast.hk/wiki/SetTimerEx
Re: Animation on chat -
Universal - 07.02.2010
Quote:
Originally Posted by dice7
|
Oh, thats what i meant to do so... But i thought there are timers in commands, like ApplyAnimation(id,anim,anim,opt,opt,opt,opt,time) or somethign...
Re: Animation on chat -
Stig - 07.02.2010
Quote:
Originally Posted by dice7
|
Sounds like the right idea :P
Peace....
Re: Animation on chat -
mansonh - 07.02.2010
Or. instead of a timer you could do
public OnPlayerKeyStateChange()
{
//clear all animations here
}
That way as soon as they press a key to move, jump, do anything other then enter chat, the animation will stop.