Please Help Me Out!
#1

Hello everyone! I need a little bit of help. I am trying to make a check to get a players health, and if it is less than or equal to 5 I want them to perform an animation basically leavign them there performing that animation until they die, and be fine when they respawn.

Here is what I am using for this:
Код:
forward DeathCheck();   /// My Forward Of Course

public DeathCheck()   /// The Function Itself Above Main
{
  for(new i= 0; i < MAX_PLAYERS; i++)
  {
    new Float:health;
    GetPlayerHealth(i, Float:health);
    if(GetPlayerHealth(i, Float:health) <= 5);
    {
      ApplyAnimation(playerid, "SWEET", "Sweet_injuredloop", 4.0,1,0,0,0,0);
    }
  }
  return 1;
}

SetTimer("DeathCheck", 1000, 1);   /// The Timer For The Function Under OnGameModeInIt
I am not sure what I forgot or why it will not work right. If it does work it is, when a player selects their skins and then continues after they spawn when it should not(I have also tried to add in a check to make sure they were spawned and no luck it still did the anim). It's kind of hard to explain I am sorry, but if you can help me with this I would appreciate it! Thanks in advance!
Reply


Messages In This Thread
Please Help Me Out! - by notec100 - 02.12.2009, 12:10
Re: Please Help Me Out! - by RyDeR` - 02.12.2009, 12:15
Re: Please Help Me Out! - by notec100 - 02.12.2009, 12:26
Re: Please Help Me Out! - by RyDeR` - 02.12.2009, 12:47
Re: Please Help Me Out! - by notec100 - 02.12.2009, 14:23
Re: Please Help Me Out! - by Nero_3D - 02.12.2009, 15:28
Re: Please Help Me Out! - by notec100 - 02.12.2009, 16:29
Re: Please Help Me Out! - by Mike Garber - 02.12.2009, 16:49

Forum Jump:


Users browsing this thread: 2 Guest(s)