1. local DRoundTimerLength = 720 --how long the round will be in seconds
  2. local forttimenum = 10
  3. local phase1 = 60
  4. local phase2 = 120
  5. local phase3 = 180
  6. local phase4 = 240
  7. local plys = player.GetAll( )
  8.  
  9. function GM:Think()
  10.  
  11. if team.NumPlayers( 1 ) > 0 then
  12. RoundType = "players"
  13. else
  14. RoundType = "NoPlayers"
  15. end
  16.  
  17. end
  18.  
  19.  
  20.  
  21. function GM:Initialize()
  22. --player.GetAll():PrintMessage( HUD_PRINTTALK, "Build a fort." )
  23. timer.Create("phase1", 10, 1, PhaseI)
  24. end
  25.  
  26. function PhaseI()
  27. --player.GetAll():PrintMessage( HUD_PRINTTALK, "Phase one, 5 manhacks. Two realesed every second." )
  28. timer.Create("phase2", 60, 1, PhaseII)
  29. ManhackSpawn( 2.5, .50 )
  30. end
  31.  
  32. function PhaseII()
  33. --player.GetAll():PrintMessage( HUD_PRINTTALK, "Phase two, 15 manhacks. Two realesed every second." )
  34. timer.Create("phase3", 120, 1, PhaseIII)
  35. ManhackSpawn( 7.5, .50 )
  36. end
  37.  
  38. function PhaseIII()
  39. --player.GetAll():PrintMessage( HUD_PRINTTALK, "Phase two, 30 manhacks. Four realesed every second." )
  40. timer.Create("phase4", 180, 1, PhaseIV)
  41. ManhackSpawn( 7.5, .50 )
  42. end
  43.  
  44. function PhaseIV()
  45. --player.GetAll():PrintMessage( HUD_PRINTTALK, "Phase two, 40 manhacks. Four realesed every second." )
  46. ManhackSpawn( 10, .25 )
  47. end
  48.  
  49.  
  50. function ManhackSpawn( count, interval)
  51. timer.Create("Manhackcount", interval, count, ManhackSpawn2)
  52. end
  53.  
  54. function ManhackSpawn2()
  55.  
  56. local SpawnPos = {}
  57. SpawnPos[1]= ents.FindByName("mha1")[1]:GetPos()
  58. SpawnPos[2]= ents.FindByName("mha2")[1]:GetPos()
  59. SpawnPos[3]= ents.FindByName("mha3")[1]:GetPos()
  60. SpawnPos[4]= ents.FindByName("mha4")[1]:GetPos()
  61. local tableRand = table.Random( SpawnPos )
  62. local manhackent = ents.Create( "npc_manhack" )
  63.  
  64. manhackent:SetPos( tableRand )
  65. manhackent:SetAngles( ents.FindByClass("info_player_start")[1]:GetAngles() )
  66. manhackent:Spawn()
  67. end
  68.  
  69. function DRoundType()
  70. Msg( RoundType )
  71. end
  72.