Is player talks, use OnePlayAnim(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0 ,0);
#1

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);
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerText

pawn Code:
public OnPlayerText(playerid, text[])
{
  ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0);
  return 1;
}
Reply
#3

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.
Reply
#4

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.
Reply
#5

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.
Reply
#6

@[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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)