Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.73 KB | None | 0 0
  1. public void OnNewGameState(GameState gs)
  2. {
  3.  
  4.  
  5. if (gs.Player.SteamID.ToString() != "")
  6. {
  7.  
  8. if (gs.Player.Team == PlayerTeam.Undefined)
  9. {
  10.  
  11. scorect_s = gs.Map.TeamCT.Score;
  12. scoret_s = gs.Map.TeamT.Score;
  13. if (scoret != scoret_s || scorect != scorect_s)
  14. {
  15.  
  16. if (scoret_s != -1)
  17. {
  18. if (scorect_s != -1)
  19. {
  20. scoret = scoret_s;
  21. scorect = scorect_s;
  22. string my = " Счёт: " + (scorect).ToString() + "-" + "" + (scoret).ToString();
  23.  
  24. // manager.function(my);
  25. this.button1.Text = my;
  26. }
  27. }
  28. }
  29.  
  30.  
  31.  
  32. }
  33. else if (gs.Player.Team == PlayerTeam.CT)
  34. {
  35. scorect_s = gs.Map.TeamCT.Score;
  36. scoret_s = gs.Map.TeamT.Score;
  37. if (scoret != scoret_s || scorect != scorect_s)
  38. {
  39.  
  40. if (scoret_s != -1)
  41. {
  42. if (scorect_s != -1)
  43. {
  44. scoret = scoret_s;
  45. scorect = scorect_s;
  46. string my = " Счёт: " + (scorect).ToString() + "-" + "" + (scoret).ToString();
  47.  
  48. // manager.function(my);
  49. this.button1.Text = my;
  50. }
  51. }
  52. }
  53.  
  54. }
  55. else if (gs.Player.Team == PlayerTeam.T)
  56. {
  57. scorect_s = gs.Map.TeamT.Score;
  58. scoret_s = gs.Map.TeamCT.Score;
  59. if (scoret != scoret_s || scorect != scorect_s)
  60. {
  61.  
  62. if (scoret_s != -1)
  63. {
  64. if (scorect_s != -1)
  65. {
  66. scoret = scoret_s;
  67. scorect = scorect_s;
  68. string my = " Счёт: " + (scorect).ToString() + "-" + "" + (scoret).ToString();
  69.  
  70. // manager.function(my);
  71. this.button1.Text = my;
  72. }
  73. }
  74. }
  75.  
  76. }
  77.  
  78.  
  79. if (gs.Map.Name == "")
  80. {
  81. string my = " Счёт: 0-0";
  82. maxTime = 0;
  83. maxTime_s = 0;
  84. // manager.function(my);
  85. this.button1.Text = my;
  86. }
  87.  
  88.  
  89. if (gs.Map.Phase == MapPhase.Undefined)
  90. {
  91. maxTime = 0;
  92. maxTime_s = 0;
  93. endgame = true;
  94. warmpup = false;
  95. if (endgame_s != endgame)
  96. {
  97. endgame_s = endgame;
  98. scoret = 0;
  99. scorect = 0;
  100. scoret_s = 0;
  101. scorect_s = 0;
  102. string my = " Счёт: 0-0";
  103.  
  104. // manager.function(my);
  105. this.button1.Text = my;
  106. // String my = "Game is over!";
  107.  
  108. }
  109. }
  110. if (gs.Map.Phase == MapPhase.Warmup)
  111. {
  112. maxTime = 0;
  113. maxTime_s = 0;
  114. endgame = false;
  115. warmpup = true;
  116. if (warmpup != warmpup_s)
  117. {
  118. warmpup_s = warmpup;
  119. // String my = "Game on state warmup!";
  120. string my = " Счёт: 0-0";
  121.  
  122. // manager.function(my);
  123. this.button1.Text = my;
  124.  
  125. }
  126. }
  127. else
  128. {
  129. }
  130.  
  131. if (gs.Map.Phase == MapPhase.Intermission)
  132. {
  133.  
  134. // maxTime = 0;
  135. // maxTime_s = 0;
  136. }
  137.  
  138.  
  139.  
  140. if (gs.Round.Phase == RoundPhase.Over)
  141. {
  142. maxTime = 0;
  143. maxTime_s = 0;
  144. // string my = "Счёт: 0-0";
  145.  
  146. // manager.function(my);
  147. // button1.Text = my;
  148. }
  149.  
  150. if (gs.Round.Phase == RoundPhase.Live)
  151. {
  152.  
  153.  
  154. if (gs.Map.Mode == MapMode.Competitive)
  155. {
  156. maxTime = 115;
  157. }
  158.  
  159. else {
  160. maxTime = 90;
  161. }
  162. if(maxTime_s == 0)
  163. {
  164. maxTime_s = maxTime;
  165. }
  166.  
  167. warmpup = false;
  168. if (warmpup != warmpup_s)
  169. {
  170. warmpup_s = warmpup;
  171. endgame_s = false;
  172. //String my = "Warmup is over!";
  173.  
  174. }
  175. }
  176. }
  177.  
  178. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement