[SOLVED] Problem with animations
#1

i made a simple chat animation when someone type something in the chat that automatic started
but i have a problem i wanna make some if that if someplayer allready in animation like crack, and he trying to speak.
the chat animation will not working , only when the player not in animation and he talking the chat animation will works
something like this.

Код:
if(ApplyAnimation == 0)
{
  ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000);
  SetTimerEx("StopTalking", 3*1000, 0,"d",playerid);
}
of course i cannot do this if, but how should i do it?
Reply
#2

As long as there is no GetPlayerAnimation, you cant define if a player is on animation. Try to do so when you ApplyAnimation it will do ApplyAnimation = 1 and then create a new timer that will set ApplyAnimation = 0 after animation finish.
Reply
#3

Thats when im trying, the problem is when someone stopanimation he just click on the mouse key.
there is not command, in my script like stopanim to stop animation .
Reply
#4

Then you can use this
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if (newkeys == KEY_FIRE && ApplyAnimation[playerid] == 1)
  {
    ApplyAnimation[playerid] = 0;
  }
  return 1;
}
Reply
#5

Quote:
Originally Posted by Dark_Kostas
Then you can use this
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if (newkeys == KEY_FIRE && ApplyAnimation[playerid] == 1)
  {
    ApplyAnimation[playerid] = 0;
  }
  return 1;
}
Thanks working perfectly
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)