Check is player loses health
#6

Quote:
Originally Posted by hipy
Quote:
Originally Posted by lrZ^ aka LarzI
I believe the callback you are thinking of Don Correlli, is in YUP.
Anyways, if you don't want to use more callbacks, just use OnPlayerUpdate
pawn Код:
//global
new
  Float:g_fUpdateHealth;
//OnPlayerUpdate
public OnPlayerUpdate(playerid)
{
  new
    Float:fUpdateHealth;
  if( fUpdateHealth != g_fUpdateHealth );
  {
    //health has changed
  }
  return true;
}
Do you have any idea how often onplayerupdate is called? yes A LOT per seconds.
Wouldn't recommend this.
20-30 times in one second.
You have to divide 1 with 25 so 40-50 ms.
Reply


Messages In This Thread
Check is player loses health - by Tyain - 12.12.2009, 01:22
Re: Check is player loses health - by Correlli - 12.12.2009, 01:25
Re: Check is player loses health - by LarzI - 12.12.2009, 01:52
Re: Check is player loses health - by hipy - 12.12.2009, 04:00
Re: Check is player loses health - by Tyain - 12.12.2009, 13:38
Re: Check is player loses health - by RyDeR` - 12.12.2009, 14:21
Re: Check is player loses health - by Tyain - 12.12.2009, 14:38
Re: Check is player loses health - by Tyain - 14.12.2009, 00:25

Forum Jump:


Users browsing this thread: 2 Guest(s)