private void OnNewGameState(GameState gs) { player = gs.Provider.SteamID; rounds = gs.Map.Round; if (rounds >= 0) { playing = true; } else { playing = false; } if (gs.Player.SteamID == player && playing && gs.Player.Activity == CSGSI.Nodes.PlayerActivity.Playing) { int kills = gs.Player.State.RoundKills; int killsHS = gs.Player.State.RoundKillHS; int assists = gs.Player.MatchStats.Assists; int deaths = gs.Player.MatchStats.Deaths; int flash = gs.Player.State.Flashed; int smoke = gs.Player.State.Smoked; int burn = gs.Player.State.Burning; int money = gs.Player.State.Money; int mvps = gs.Player.MatchStats.MVPs; if (flash == 0) { flashed = false; } if (smoke == 0) { smoked = false; } if (burn == 0) { burning = false; } if (kills == 0) { lastKills = 0; } if (killsHS == 0) { lastKillsHS = 0; } if (mvps == 0) { lastMVPs = 0; } if (assists == 0) { lastAssists = 0; } if (deaths == 0) { lastDeaths = 0; } if (gs.Player.Weapons.ActiveWeapon.State != CSGSI.Nodes.WeaponState.Reloading) { reloading = false; } if (money < CS_MM_MAXMONEY && gs.Map.Mode != MapMode.ScrimComp2v2) { maxMoney = false; } if (money < CS_WM_MAXMONEY && gs.Map.Mode == MapMode.ScrimComp2v2) { maxMoney = false; } if (gs.Player.Weapons.ActiveWeapon.Type != WeaponType.Knife) { knife = false; } //TASER if (gs.Player.Weapons.ContainsWeapon("weapon_taser")) { BindExecuter.ExecuteBind(slot3, mainForm.Taser()); if (gs.Player.Weapons.ActiveWeapon.Name == "weapon_taser") { BindExecuter.ExecuteBind(taserKey, mainForm.Taser()); BindExecuter.ExecuteBind(slot2, mainForm.Taser()); BindExecuter.ExecuteBind(slot1, mainForm.Taser()); } } //ACE ALL HS if (killsHS != lastKillsHS && killsHS == CS_MM_TEAMSIZE && gs.Map.Mode != MapMode.ScrimComp2v2) { BindExecuter.ExecuteBind(spAceKey, mainForm.SpecialAce()); } if (killsHS != lastKillsHS && killsHS == CS_WM_TEAMSIZE && gs.Map.Mode == MapMode.ScrimComp2v2) { BindExecuter.ExecuteBind(spAceKey, mainForm.SpecialAce()); } //ACE if (kills != lastKills && kills == CS_MM_TEAMSIZE && gs.Map.Mode != MapMode.ScrimComp2v2) { BindExecuter.ExecuteBind(aceKey, mainForm.Ace()); } if (kills != lastKills && kills == CS_WM_TEAMSIZE && gs.Map.Mode == MapMode.ScrimComp2v2) { BindExecuter.ExecuteBind(aceKey, mainForm.Ace()); } //KNIFE KILL if (kills != lastKills && kills > 0 && gs.Player.Weapons.ActiveWeapon.Type == WeaponType.Knife) { if (kills > lastKills) { BindExecuter.ExecuteBind(spKillKey, mainForm.SpecialKill()); } lastKills = kills; } //MVP if (mvps != lastMVPs && mvps > 0) { if (mvps > lastMVPs) { BindExecuter.ExecuteBind(mvpKey, mainForm.MVP()); } lastMVPs = mvps; } //HS KILL if (killsHS != lastKillsHS && killsHS > 0) { if (killsHS > lastKillsHS) { BindExecuter.ExecuteBind(killHSKey, mainForm.KillHS()); } lastKillsHS = killsHS; } //KILL if (kills != lastKills && kills > 0) { if (kills > lastKills) { BindExecuter.ExecuteBind(killKey, mainForm.Kill()); } lastKills = kills; } //ASSISTS if (assists != lastAssists && assists > 0) { if (assists > lastAssists) { BindExecuter.ExecuteBind(assistKey, mainForm.Assist()); } lastAssists = assists; } //DEATH if (deaths != lastDeaths && deaths > 0) { if (deaths > lastDeaths) { BindExecuter.ExecuteBind(deathKey, mainForm.Death()); } lastDeaths = deaths; } //16K MONEY if (money == CS_MM_MAXMONEY && gs.Map.Mode != MapMode.ScrimComp2v2 && !maxMoney) { BindExecuter.ExecuteBind(moneyKey, mainForm.Money()); maxMoney = true; } //8K MONEY if (money == CS_MM_MAXMONEY && gs.Map.Mode == MapMode.ScrimComp2v2 && !maxMoney) { BindExecuter.ExecuteBind(moneyKey, mainForm.Money()); maxMoney = true; } //FLASH if (flash > 0 && !flashed) { BindExecuter.ExecuteBind(flashKey, mainForm.Flash()); flashed = true; } //BURN if (burn > 0 && !burning) { BindExecuter.ExecuteBind(burnKey, mainForm.Burn()); burning = true; } //SMOKE if (smoke > 0 && !smoked) { BindExecuter.ExecuteBind(smokeKey, mainForm.Smoke()); smoked = true; } //RELOAD if (gs.Player.Weapons.ActiveWeapon.State == CSGSI.Nodes.WeaponState.Reloading && !reloading) { BindExecuter.ExecuteBind(reloadKey, mainForm.Reload()); reloading = true; } //KNIFE if (gs.Player.Weapons.ActiveWeapon.Type == WeaponType.Knife && !knife) { BindExecuter.ExecuteBind(knifeKey, mainForm.Knife()); knife = true; } } }