Imortal Vehicle & People problem
#2

pawn Код:
SetTimer("ImortalPerson",100,true);
   SetTimer("ImortalVehicle",100,true);

public ImortalVehicle() ; no


pawn Код:
forward ImortalVehicle();
public ImortalVehicle()
{
  //func.....
  return 1;
}
pawn Код:
#include <a_samp>

//public OnGameModeInit()
public OnFilterScriptInit()
{
    SetTimer("godplayerorvehicle",1000,true);
    return 1;
}

forward godplayerorvehicle();
public godplayerorvehicle()
{
    new
        MaxPlayers = GetMaxPlayers();
    for(new i; i < MaxPlayers; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        new
            Float:HP,
            VehicleID = GetPlayerVehicleID(i);
        if(VehicleID)
        {
            GetVehicleHealth(VehicleID, HP);
            if(HP < 500) { RepairVehicle(VehicleID); }
        } else {
            GetPlayerHealth(i, HP);
            if(HP < 99) { SetPlayerHealth(i, 100); }
        }
    }
    return 1;
}
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: 4 Guest(s)