[DUV] Tem Como?
#4

pawn Code:
new t1, t2;
new isVehicleExploding[MAX_VEHICLES] = 0;
forward VerifyVehiclesHealth();
forward ExplodeDmgdVehicles();

public OnGameModeInit()
{
  t1 = SetTimer("VerifyVehiclesHealth",1000,1);
  t2 = SetTimer("ExplodeDmgdVehicles",1001,1);
  return 1;
}

public OnVehicleSpawn(vehicleid)
{
  isVehicleExploding[vehicleid] = 0;
  return 1;
}

public VerifyVehiclesHealth()
{
  for(new i = 0; i < MAX_VEHICLES; i++)
  {
    isVehicleExploding[i] ++;
    new VehicleHealth[i];
    GetVehicleHealth(i,VehicleHealth[i]);
    if(VehicleHealth[i] < 250) SetVehicleHealth(i,250);
  }
}

public ExplodeDmgdVehicles()
{
  for(new i = 0; i < MAX_VEHICLES; i++)
  {
    if(isVehicleExploding[i] >= 60) SetVehicleHealth(i,1);
  }
}
Nгo testei e nгo sei se vai compilar/funcionar, mas eu TENTEI fazer ai, a parte de o carro sу explodir depois de 1 minuto pegando fogo... se funcionar, й o primeiro passo para o que vocк quer fazer.
Reply


Messages In This Thread
[DUV] Tem Como? - by Escallus - 26.01.2010, 00:57
Re: [DUV] Tem Como? - by JustinSton - 26.01.2010, 01:02
Re: [DUV] Tem Como? - by Escallus - 26.01.2010, 01:11
Re: [DUV] Tem Como? - by [O_o]Davidovich - 26.01.2010, 01:22
Re: [DUV] Tem Como? - by Escallus - 26.01.2010, 01:41
Re: [DUV] Tem Como? - by [O_o]Davidovich - 26.01.2010, 10:58
Re: [DUV] Tem Como? - by Escallus - 26.01.2010, 15:19
Re: [DUV] Tem Como? - by Braulio_BcO - 27.01.2010, 10:19

Forum Jump:


Users browsing this thread: 1 Guest(s)