12.08.2013, 11:24
Hello everyone,
I'm having an issue, I've made a automatic repair timer + code, but In-game it's not working.
I'm having an issue, I've made a automatic repair timer + code, but In-game it's not working.
pawn Код:
forward AutoRepair();
pawn Код:
SetTimer("AutoRepair",500,1);
pawn Код:
public AutoRepair(){
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i)) if(IsPlayerInAnyVehicle(i)){
new Float:fVehicleHealth;
GetVehicleHealth(GetPlayerVehicleID(i),fVehicleHealth);
if(fVehicleHealth < 900) SetVehicleHealth(GetPlayerVehicleID(i),1000.0);
}
}
}