Difference between oldand new carhealth
#6

I didn't mean 'basics' like scripting basics.. I meant for your timer

pawn Код:
forward CarHealthTimer();
public CarHealthTimer()
{
  for (new i=0; i < MAX_PLAYERS; i++)
  {
    if (IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
    {
       new Float:current[MAX_PLAYERS];
       GetVehicleHealth(GetPlayerVehicleID(i),current[i]);
       if(current[i] < oldhealth[i]) { // action
       }
       // then you overwrite your old health..
      oldhealth[i] = current[i];
     }
  }
}
Like that..
Reply


Messages In This Thread
Difference between oldand new carhealth - by Remi-X - 18.06.2009, 21:10
Re: Difference between oldand new carhealth - by mamorunl - 18.06.2009, 21:16
Re: Difference between oldand new carhealth - by Remi-X - 18.06.2009, 21:19
Re: Difference between oldand new carhealth - by mamorunl - 18.06.2009, 21:23
Re: Difference between oldand new carhealth - by Remi-X - 18.06.2009, 21:28
Re: Difference between oldand new carhealth - by mamorunl - 18.06.2009, 21:59
Re: Difference between oldand new carhealth - by Remi-X - 19.06.2009, 07:36
Re: Difference between oldand new carhealth - by Abernethy - 19.06.2009, 07:39
Re: Difference between oldand new carhealth - by Remi-X - 19.06.2009, 07:44
Re: Difference between oldand new carhealth - by Andom - 19.06.2009, 07:46

Forum Jump:


Users browsing this thread: 1 Guest(s)