How ?
#8

untested, but should work like a charm
pawn Код:
new cords[][] {
  {0,0,0,0}, // round 0
  {0,0,0,0}, // round 1
  {0,0,0,0}, // round 2
  {0,0,0,0}  // round 3
}
new
  round,
  timer
;
public onGameModeInit() {
  timer=SetTimer("round", 600000, 1);
}
public OnGameModeExit() {
  KillTimer(timer);
}
forward round();
public round() {
  ClearRoundObjects(round);
  if(round==3) {
    round=0;
  }else{
    round++;
  }
  CreateRoundObjects(round);
  RespawnAll();
}
ClearRoundObjects(round) {
  switch(round) {
    case 0: {}
    case 1: {}
    case 2: {}
    case 3: {}
  }
}
CreateRoundObjects(round) {
  switch(round) {
    case 0: {}
    case 1: {}
    case 2: {}
    case 3: {}
  }
}
RespawnAll() {
  // Will be faster to check once than make a loop and check for each player
  switch(round) {
    case 0: {
      new id=0;
      foreach(new i : Player) {
        SetPlayerPos(i, cords[id][0], cords[id][1], cords[id][2]);
        SetPlayerFacingAngle(cords[id][3]);
      }
    }
    case 1: {
      new id=1;
      foreach(new i : Player) {
        SetPlayerPos(i, cords[id][0], cords[id][1], cords[id][2]);
        SetPlayerFacingAngle(cords[id][3]);
      }
    }
    case 2: {
      new id=2;
      foreach(new i : Player) {
        SetPlayerPos(i, cords[id][0], cords[id][1], cords[id][2]);
        SetPlayerFacingAngle(cords[id][3]);
      }
    }
    case 3: {
      new id=3;
      foreach(new i : Player) {
        SetPlayerPos(i, cords[id][0], cords[id][1], cords[id][2]);
        SetPlayerFacingAngle(cords[id][3]);
      }
    }
}
Reply


Messages In This Thread
How ? - by Glossy42O - 27.12.2014, 14:41
Re: How ? - by jackx3rx - 27.12.2014, 14:53
Re: How ? - by Glossy42O - 27.12.2014, 14:55
Re: How ? - by jackx3rx - 27.12.2014, 14:57
Re: How ? - by Glossy42O - 27.12.2014, 15:03
Re: How ? - by jackx3rx - 27.12.2014, 15:13
Re: How ? - by Dignity - 27.12.2014, 15:18
Re: How ? - by Kaperstone - 27.12.2014, 15:20
Re: How ? - by Glossy42O - 27.12.2014, 15:29
Re: How ? - by Dignity - 27.12.2014, 15:36

Forum Jump:


Users browsing this thread: 1 Guest(s)