SA-MP Forums Archive
Hey all :) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Hey all :) (/showthread.php?tid=238478)



Hey all :) - trapped1 - 11.03.2011

So I need help with one command... how to set player in crack animation when he has 1/4 of health?


Re: Hey all :) - Bu$ter - 11.03.2011

Use something like this..
Код:
forward Health();
public Health()
{
    for(new i; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
    	         new Float:health;
	            GetPlayerHealth(i, health);
	            if(health < 25)
	            {
                        ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
                    }
            }
        } 
  return 1;
}
Im not 100% sure does it work but you should try to do it like that


Re: Hey all :) - trapped1 - 11.03.2011

Thank you very much my mate It works 100 %