02.12.2009, 12:10
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:
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!
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