Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void OnNewGameState(GameState gs)
- {
- if (gs.Player.SteamID.ToString() != "")
- {
- if (gs.Player.Team == PlayerTeam.Undefined)
- {
- scorect_s = gs.Map.TeamCT.Score;
- scoret_s = gs.Map.TeamT.Score;
- if (scoret != scoret_s || scorect != scorect_s)
- {
- if (scoret_s != -1)
- {
- if (scorect_s != -1)
- {
- scoret = scoret_s;
- scorect = scorect_s;
- string my = " Счёт: " + (scorect).ToString() + "-" + "" + (scoret).ToString();
- // manager.function(my);
- this.button1.Text = my;
- }
- }
- }
- }
- else if (gs.Player.Team == PlayerTeam.CT)
- {
- scorect_s = gs.Map.TeamCT.Score;
- scoret_s = gs.Map.TeamT.Score;
- if (scoret != scoret_s || scorect != scorect_s)
- {
- if (scoret_s != -1)
- {
- if (scorect_s != -1)
- {
- scoret = scoret_s;
- scorect = scorect_s;
- string my = " Счёт: " + (scorect).ToString() + "-" + "" + (scoret).ToString();
- // manager.function(my);
- this.button1.Text = my;
- }
- }
- }
- }
- else if (gs.Player.Team == PlayerTeam.T)
- {
- scorect_s = gs.Map.TeamT.Score;
- scoret_s = gs.Map.TeamCT.Score;
- if (scoret != scoret_s || scorect != scorect_s)
- {
- if (scoret_s != -1)
- {
- if (scorect_s != -1)
- {
- scoret = scoret_s;
- scorect = scorect_s;
- string my = " Счёт: " + (scorect).ToString() + "-" + "" + (scoret).ToString();
- // manager.function(my);
- this.button1.Text = my;
- }
- }
- }
- }
- if (gs.Map.Name == "")
- {
- string my = " Счёт: 0-0";
- maxTime = 0;
- maxTime_s = 0;
- // manager.function(my);
- this.button1.Text = my;
- }
- if (gs.Map.Phase == MapPhase.Undefined)
- {
- maxTime = 0;
- maxTime_s = 0;
- endgame = true;
- warmpup = false;
- if (endgame_s != endgame)
- {
- endgame_s = endgame;
- scoret = 0;
- scorect = 0;
- scoret_s = 0;
- scorect_s = 0;
- string my = " Счёт: 0-0";
- // manager.function(my);
- this.button1.Text = my;
- // String my = "Game is over!";
- }
- }
- if (gs.Map.Phase == MapPhase.Warmup)
- {
- maxTime = 0;
- maxTime_s = 0;
- endgame = false;
- warmpup = true;
- if (warmpup != warmpup_s)
- {
- warmpup_s = warmpup;
- // String my = "Game on state warmup!";
- string my = " Счёт: 0-0";
- // manager.function(my);
- this.button1.Text = my;
- }
- }
- else
- {
- }
- if (gs.Map.Phase == MapPhase.Intermission)
- {
- // maxTime = 0;
- // maxTime_s = 0;
- }
- if (gs.Round.Phase == RoundPhase.Over)
- {
- maxTime = 0;
- maxTime_s = 0;
- // string my = "Счёт: 0-0";
- // manager.function(my);
- // button1.Text = my;
- }
- if (gs.Round.Phase == RoundPhase.Live)
- {
- if (gs.Map.Mode == MapMode.Competitive)
- {
- maxTime = 115;
- }
- else {
- maxTime = 90;
- }
- if(maxTime_s == 0)
- {
- maxTime_s = maxTime;
- }
- warmpup = false;
- if (warmpup != warmpup_s)
- {
- warmpup_s = warmpup;
- endgame_s = false;
- //String my = "Warmup is over!";
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement