26.02.2011, 11:18
Maybe you will prefer an auto fix system?
:
Top of the script:
Ongamemodeinit
Thats it! you have a working auto fix system
:
Top of the script:
pawn Код:
forward AutoFix();
pawn Код:
SetTimer("AutoFix", 1000, 1);
pawn Код:
public AutoFix() {
for(new playerid=0; playerid<MAX_PLAYERS; playerid++) {
if(IsPlayerConnected(playerid)) {
new Float:health, cid;
if (IsPlayerInAnyVehicle(playerid)) {
cid = GetPlayerVehicleID(playerid);
GetVehicleHealth(cid, health);
if (health < 950) {
RepairVehicle(GetPlayerVehicleID(playerid));
}
}
}
}
return 1;
}