SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 30/05/2010, 12:50 PM   #1
Ihsan_Cingisiz
Huge Clucker
 
Join Date: May 2010
Posts: 290
Reputation: 0
Default Is player talks, use OnePlayAnim(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0 ,0);

Hello,
How can i do for if a player talks in game
that he uses this animation
OnePlayAnim(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0 ,0);
Ihsan_Cingisiz is offline  
Old 30/05/2010, 12:54 PM   #2
NewTorran
Huge Clucker
 
Join Date: May 2010
Posts: 415
Reputation: 4
Default Re: Is player talks, use OnePlayAnim(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0 ,0);

http://wiki.sa-mp.com/wiki/OnPlayerText

pawn Code:
public OnPlayerText(playerid, text[])
{
  ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0);
  return 1;
}
NewTorran is offline  
Old 30/05/2010, 12:55 PM   #3
Lewwy
High-roller
 
Lewwy's Avatar
 
Join Date: Nov 2007
Location: Scotland
Posts: 1,043
Reputation: 5
Default Re: Is player talks, use OnePlayAnim(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0 ,0);

pawn Code:
public OnPlayerText(playerid, text[])
{
   ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.0, 0, 0, 0, 1, 1);
   SetTimerEx("StopChat", 1000, false, "i", playerid);
   return 1;
}

forward StopChat(playerid);
public StopChat(playerid)
{
   ClearAnimations(playerid);
   return 1;
}

Something like that.
Lewwy is offline  
Old 30/05/2010, 04:01 PM   #4
Tr1viUm
Big Clucker
 
Tr1viUm's Avatar
 
Join Date: Dec 2006
Posts: 143
Reputation: 0
Default Re: Is player talks, use OnePlayAnim(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0 ,0);

I don't get why people don't use the internal ApplyAnimation timer.

Code:
public OnPlayerText(playerid, text[]){
  ApplyAnimation(playerid,"PED","IDLE_CHAT",3.8,1,1,1,0,1000);
  return 1;
}
1000 is the time in miliseconds. For your information, 1000 miliseconds is 1 second.
Tr1viUm is offline  
Old 30/05/2010, 04:17 PM   #5
Lewwy
High-roller
 
Lewwy's Avatar
 
Join Date: Nov 2007
Location: Scotland
Posts: 1,043
Reputation: 5
Default Re: Is player talks, use OnePlayAnim(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0 ,0);

Quote:
Originally Posted by [MOB
Tr1viUm ]
I don't get why people don't use the internal ApplyAnimation timer.
Never really looked at the function before, thank you for that though.
Lewwy is offline  
Old 30/05/2010, 04:26 PM   #6
Sergei
High-roller
 
Sergei's Avatar
 
Join Date: Mar 2008
Location: Slovenia
Posts: 2,870
Reputation: 230
Default Re: Is player talks, use OnePlayAnim(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0 ,0);

@[MOB]Tr1viUm, because it doesn't work if you don't freeze player in position. And people usually want to move when performing chat animation.
__________________
Watch out, scouts everywhere!
Sergei is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED]warning 224: indeterminate array size in "sizeof" expression (symbol "") LarzI Help Archive 2 22/12/2009 05:32 AM
Admin script requires "ReturnUser", "strtok" and "IsNumeric" Rubennnnn Help Archive 1 02/12/2009 07:08 PM
NO servers found when I click "Internet tab" or "official tab" need help plzzz! Jmaster543 Server Support 1 03/05/2009 01:27 AM
"Bots", "AI", "NPCs"... Computer-controlled pedestrians and traffic! ssflsnoob General 2 23/11/2008 07:06 PM


All times are GMT. The time now is 10:15 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.