11.02.2011, 07:30
pawn Код:
public AutoR()
{
for(new playerid=0; playerid<MAX_PLAYERS; playerid++)
{
if(IsPlayerConnected(playerid))
{
new Float:health, cid;
if (IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerAdmin(playerid)) return 0;
cid = GetPlayerVehicleID(playerid);
GetVehicleHealth(cid, health);
if (health < 300)
{
SetVehicleHealth(cid,1000);
GameTextForPlayer(playerid, "Vehicul reparat!",2000,5);
}
}
}
}
return 1;
}