How do i make the timers work
#1

I'm looking to make a timer that makes your car HP go to 1000 every 3 seconds
Reply
#2

Code:
forward VehicleRepair(playerid);
public VehicleRepaire(playerid)
{
  RepairVehicle(GetPlayerVehicleID(playerid));
  SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
{
OnGameModeInit:

Code:
SetTimer("VehicleRepair",3000,false);
Reply
#3

Quote:

every 3 seconds

pawn Code:
forward RepairVehicle();
public RepairVehicle() {
  for(new i; i<MAX_PLAYERS; i++) {
    if(IsPlayerInAnyVehicle(i)) {
      RepairVehicle(GetPlayerVehicleID(i));
    }
  }
  return true;
}
//...
SetTimer("RepairVehicle", 3000, true);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)