Animation doesn't start[FIXED]
#1

Look at the code;

pawn Код:
public CheckPlayerHealth()
{
  new string[256];
  new sendername[MAX_PLAYER_NAME];
  for (new i=0; i < MAX_PLAYERS; i++)
  {
    if (IsPlayerConnected(i) && GetPlayerState(i) == PLAYER_STATE_ONFOOT)
    {
      new Float:health;
      GetPlayerHealth(i,health);
       if(health < 20.0)
       {
         ApplyAnimation(i, "ped", "FALL_front", 4.0, 1, 0, 0, 0, 0);
        TogglePlayerControllable(i, 0);
        ApplyAnimation(i, "ped", "FALL_front", 4.0, 1, 0, 0, 0, 0);
        SetPlayerHealth(i, 20.0);
        GetPlayerName(i, sendername, sizeof(sendername));
        format(string, sizeof(string), "* %s atslēdzas un nokrīt uz zemes, jo ir ievainots", sendername);
        ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        format(string, sizeof(string), "* Atslēdzies (( %s ))", sendername);
        ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        SendClientMessage(i, COLOR_RED, "Tu esi atslēdzies, gaidi mediķus vai raksti /acceptdeath");
        IsOnDeath[i] = 1;
       }
     }
  }
}
When player has under 20 HP, it automatic goes on animation, but animation doesnt start, and i want that player cant go out of animation.
Can someone help me, please?
Reply


Messages In This Thread
Animation doesn't start[FIXED] - by Bumbis - 13.06.2010, 15:11
Re: Animation doesn't start - by Lynn - 13.06.2010, 15:19
Re: Animation doesn't start - by Bumbis - 13.06.2010, 15:20
Re: Animation doesn't start - by Thrarod - 13.06.2010, 15:23
Re: Animation doesn't start - by Lynn - 13.06.2010, 15:23
Re: Animation doesn't start - by Bumbis - 13.06.2010, 15:38

Forum Jump:


Users browsing this thread: 1 Guest(s)