Hp script
#9

Quote:
Originally Posted by Tanush123
Посмотреть сообщение
umm you added it in timer? if so try using it onplayerupdate. Or maybe if your using onplayerupdate and it doesnt work on timer, try doing the bottom with your timer.
pawn Код:
new HPTimer[MAX_PLAYERS];
^ thats on top,
pawn Код:
SetTimerEx("FallDown",100,true,"i",playerid);
^ thats on playerspawn
pawn Код:
forward FallDown(playerid);
public FallDown(playerid)
{
      new Float:phealth;
      GetPlayerHealth(playerid,phealth);
      if(phealth < 51)
      {
                 //apply the fall animation
                 TogglePlayerControllable(playerid,0);
                 SendClientMessage(playerid,-1,"You have falled to the ground because you are injured");
                 KillTimer(HPTimer[playerid]);
      }
      return 1;
}
^ thats anywhere in your script (just put it in the end)
i use the new code but still spmming You have falled to the ground because you are injured :P
Reply


Messages In This Thread
Hp script - by N0FeaR - 09.01.2012, 00:22
Re: Hp script - by Tanush123 - 09.01.2012, 00:33
Re: Hp script - by N0FeaR - 09.01.2012, 00:58
Re: Hp script - by Tanush123 - 09.01.2012, 01:01
Re: Hp script - by N0FeaR - 09.01.2012, 01:26
Re: Hp script - by Tanush123 - 09.01.2012, 02:16
Re: Hp script - by Rob_Maate - 09.01.2012, 06:16
Re: Hp script - by N0FeaR - 09.01.2012, 06:39
Re: Hp script - by N0FeaR - 09.01.2012, 07:14
Re: Hp script - by N0FeaR - 09.01.2012, 15:34

Forum Jump:


Users browsing this thread: 2 Guest(s)