02.04.2010, 09:50
I'm looking to make a timer that makes your car HP go to 1000 every 3 seconds
forward VehicleRepair(playerid); public VehicleRepaire(playerid) { RepairVehicle(GetPlayerVehicleID(playerid)); SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0); {
SetTimer("VehicleRepair",3000,false);
every 3 seconds |
forward RepairVehicle();
public RepairVehicle() {
for(new i; i<MAX_PLAYERS; i++) {
if(IsPlayerInAnyVehicle(i)) {
RepairVehicle(GetPlayerVehicleID(i));
}
}
return true;
}
//...
SetTimer("RepairVehicle", 3000, true);