Guest User

Untitled

a guest
Apr 25th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.80 KB | None | 0 0
  1. //--------------------------------------------------------------------------------//
  2.  
  3. #include <amxmodx>
  4. #include <fun>
  5.  
  6. //--------------------------------------------------------------------------------//
  7.  
  8. new roundcounter = 1 // Counts the rounds
  9. new playercounter = 0 // How much players are in the server
  10. new alrstarted = 0 // Check if round is already started
  11. //float: cvar_setroundtime // Sets the Round time
  12.  
  13. //--------------------------------------------------------------------------------//
  14.  
  15. public plugin_init()
  16. {
  17. register_plugin( "HLrounds", "1.0", "Sniper ll Mp3" )
  18. register_clcmd("sayteam /spec","hdead")
  19. register_cvar("amx_setroundtime", "50.0")
  20. set_task( 10.0, "StatusCheck", 0, "", 0, "b" )
  21. }
  22.  
  23. //--------------------------------------------------------------------------------//
  24.  
  25. public StatusCheck(id)
  26. {
  27.  
  28. if(playercounter >= 2 && alrstarted == 0)
  29. {
  30. //client_print(id,print_chat,"Players = %d [Enaugh players starting the game...]",playercounter)
  31.  
  32. set_hudmessage(0, 255, 0, -1.0, 0.37, 0, 6.0, 12.0)
  33. show_hudmessage(id, "[Round %d Started]",roundcounter)
  34.  
  35. alrstarted = 1
  36.  
  37. set_task( get_cvar_float("amx_setroundtime") - 13.0, "TaskCommands1")
  38. set_task( get_cvar_float("amx_setroundtime") - 12.0, "TaskCommands2")
  39. set_task( get_cvar_float("amx_setroundtime") - 11.0, "TaskCommands3")
  40. set_task( get_cvar_float("amx_setroundtime") - 10.0, "TaskCommands4")
  41. set_task( get_cvar_float("amx_setroundtime") - 9.0, "TaskCommands5")
  42. set_task( get_cvar_float("amx_setroundtime") - 8.0, "TaskCommands6")
  43. set_task( get_cvar_float("amx_setroundtime") - 5.0, "TaskCommands7")
  44. set_task( get_cvar_float("amx_setroundtime") - 4.0, "TaskCommands8")
  45. set_task( get_cvar_float("amx_setroundtime") - 3.0, "TaskCommands9")
  46. set_task( get_cvar_float("amx_setroundtime") - 2.0, "TaskCommands10")
  47. set_task( get_cvar_float("amx_setroundtime") - 1.0, "TaskCommands11")
  48. set_task( get_cvar_float("amx_setroundtime"), "TaskCommands12")
  49. }
  50.  
  51. if(playercounter < 2)
  52. {
  53. client_print(0,print_chat,"[Waiting for more players]")
  54. }
  55. }
  56.  
  57. public client_putinserver(id)
  58. {
  59. playercounter += 1
  60.  
  61. }
  62.  
  63. public client_disconnect(id)
  64. {
  65. playercounter -= 1
  66. }
  67.  
  68. public hdead(id)
  69. {
  70. console_cmd(id,"spectate")
  71. }
  72.  
  73. public TaskCommands6( id )
  74. {
  75. client_cmd( id, "sayteam /spec" )
  76. }
  77.  
  78. public TaskCommands1( id )
  79. {
  80. client_print(id,print_chat,"Round ends in 5 seconds...")
  81. }
  82.  
  83. public TaskCommands2( id )
  84. {
  85. client_print(id,print_chat,"Round ends in 4 seconds...")
  86. }
  87.  
  88. public TaskCommands3( id )
  89. {
  90. client_print(id,print_chat,"Round ends in 3 seconds...")
  91. }
  92.  
  93. public TaskCommands4( id )
  94. {
  95. client_print(id,print_chat,"Round ends in 2 seconds...")
  96. }
  97.  
  98. public TaskCommands5( id )
  99. {
  100. client_print(id,print_chat,"Round ends in 1 second...")
  101. }
  102.  
  103. public TaskCommands7( id )
  104. {
  105. set_hudmessage(0, 255, 0, -1.0, 0.37, 0, 6.0, 12.0)
  106. show_hudmessage(id, "[Round %d Ended]",roundcounter)
  107. client_print(id,print_chat,"New Round starts in 5 second...")
  108. }
  109.  
  110. public TaskCommands8( id )
  111. {
  112. client_print(id,print_chat,"New Round starts in 4 second...")
  113. }
  114.  
  115. public TaskCommands9( id )
  116. {
  117. client_print(id,print_chat,"New Round starts in 3 second...")
  118. }
  119.  
  120. public TaskCommands10( id )
  121. {
  122. client_print(id,print_chat,"New Round starts in 2 second...")
  123. }
  124.  
  125. public TaskCommands11( id )
  126. {
  127. client_print(id,print_chat,"New Round starts in 1 second...")
  128. }
  129.  
  130. public TaskCommands12( id )
  131. {
  132. client_cmd( id, "sayteam /spec" )
  133. alrstarted = 0
  134. roundcounter += 1
  135. }
  136.  
  137. //--------------------------------------------------------------------------------//
Add Comment
Please, Sign In to add comment