Imortal Vehicle & People problem
#4

pawn Код:
forward ImortalPerson();
pawn Код:
public ImortalPerson()
{
  new Float:HP,
    vehicleid;

  for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
  {
    if(!IsPlayerConnected(playerid)) continue;

    GetPlayerHealth(playerid, HP);

    if(HP < 100.0)
    {
      SetPlayerHealth(playerid, 100.0);
    }
   
    if(IsPlayerInAnyVehicle(playerid))
    {
      vehicleid = GetPlayerVehicleID(playerid);

      GetVehicleHealth(vehicleid, HP);

      if(HP < 1000.0)
      {
        SetVehicleHealth(vehicleid, 1000.0);
      }
    }
  }
  return 1;
}
pawn Код:
public OnGameModeInit()
{
  SetTimer("ImortalPerson", 1000, true);
}
Reply


Messages In This Thread
Imortal Vehicle & People problem - by Micko9 - 31.01.2010, 11:41
Re: Imortal Vehicle & People problem - by smeti - 31.01.2010, 11:44
Re: Imortal Vehicle & People problem - by Micko9 - 31.01.2010, 11:53
Re: Imortal Vehicle & People problem - by Finn - 31.01.2010, 12:03
Re: Imortal Vehicle & People problem - by Micko9 - 31.01.2010, 12:08
Re: Imortal Vehicle & People problem - by Finn - 31.01.2010, 12:19
Re: Imortal Vehicle & People problem - by Micko9 - 31.01.2010, 12:20
Re: Imortal Vehicle & People problem - by Finn - 31.01.2010, 12:22
Re: Imortal Vehicle & People problem - by Nakash - 31.01.2010, 12:24
Re: Imortal Vehicle & People problem - by Micko9 - 31.01.2010, 12:27

Forum Jump:


Users browsing this thread: 1 Guest(s)