diff --git a/README.md b/README.md index c4bf56e..e890d45 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,7 @@ Pressing the menu button again closes menus. - bots_play_jumpdrop - a boolean value (0 or 1), whether or not if the bots will jump shot or drop shot - bots_play_target_other - a boolean value (0 or 1), whether or not if the bots will target claymores, killstreaks, etc. - bots_play_killstreak - a boolean value (0 or 1), whether or not if the bots will use killstreaks +- bots_play_ads - a boolean value (0 or 1), whether or not if the bots will ads --- diff --git a/main_shared/maps/mp/bots/_bot.gsc b/main_shared/maps/mp/bots/_bot.gsc index 308a00f..07c721b 100644 --- a/main_shared/maps/mp/bots/_bot.gsc +++ b/main_shared/maps/mp/bots/_bot.gsc @@ -79,6 +79,8 @@ init() setDvar("bots_play_target_other", true); if(getDvar("bots_play_killstreak") == "")//bot use killstreaks setDvar("bots_play_killstreak", true); + if(getDvar("bots_play_ads") == "")//bot ads + setDvar("bots_play_ads", true); if(!isDefined(game["botWarfare"])) game["botWarfare"] = true; diff --git a/main_shared/maps/mp/bots/_bot_internal.gsc b/main_shared/maps/mp/bots/_bot_internal.gsc index 701ffb0..74951c2 100644 --- a/main_shared/maps/mp/bots/_bot_internal.gsc +++ b/main_shared/maps/mp/bots/_bot_internal.gsc @@ -1177,6 +1177,9 @@ canAds(dist, curweap) if(curweap == "none") return false; + if (!getDvarInt("bots_play_ads")) + return false; + far = level.bots_noADSDistance; if(self hasPerk("specialty_bulletaccuracy")) far *= 1.4; diff --git a/main_shared/maps/mp/bots/_menu.gsc b/main_shared/maps/mp/bots/_menu.gsc index f48169e..f1ec5c6 100644 --- a/main_shared/maps/mp/bots/_menu.gsc +++ b/main_shared/maps/mp/bots/_menu.gsc @@ -762,6 +762,13 @@ AddOptions() else _temp = "false"; self AddMenu("set1", 10, "Bots can use killstreaks: "+_temp, ::bot_func, "killstreak", _tempDvar); + + _tempDvar = getDvarInt("bots_play_ads"); + if(_tempDvar) + _temp = "true"; + else + _temp = "false"; + self AddMenu("set1", 11, "Bots can ads: "+_temp, ::bot_func, "ads", _tempDvar); } bot_func(a, b) @@ -812,6 +819,10 @@ bot_func(a, b) setDvar("bots_play_killstreak", !b); self iPrintln("Bots use killstreaks: " + !b); break; + case "ads": + setDvar("bots_play_ads", !b); + self iPrintln("Bots ads: " + !b); + break; } }