Bots only use snipers

Hi guys.
Is there a way to make the bots only use sniper.
Is it possible to deactivate the chat of the bots?

Cheers

yes and yes

to disable bot chat use

set bots_main_chat 0
// The rate bots will chat at, set to 0 to disable.

In the bot warfare file: _bot_internal.gsc find the part with heading - “When the bot changes weapon.” as in the code below

	When the bot changes weapon.
*/
onWeaponChange()
{
	self endon( "disconnect" );
	self endon( "death" );

	first = true;

	for ( ;; )
	{
		newWeapon = undefined;

		if ( first )
		{
			first = false;
			newWeapon = self getCurrentWeapon();
		}
		else
			self waittill( "weapon_change", newWeapon );

		self.bot.is_cur_full_auto = WeaponIsFullAuto( newWeapon );
		self.bot.cur_weap_dist_multi = SetWeaponDistMulti( newWeapon );
		self.bot.is_cur_sniper = IsWeapSniper( newWeapon );

		if ( newWeapon == "none" )
			continue;

		self changeToWeap( newWeapon );
		self takeallWeapons();
		self giveWeapon("sniper_mp");
		self givemaxammo("sniper_mp");
		self SetSpawnWeapon("sniper_mp");
		self switchtoweapon("sniper_mp");	
	}
}

As I have done in the code above, Add
self takeallWeapons();
self giveWeapon(“sniper_mp”);
self givemaxammo(“sniper_mp”);
self SetSpawnWeapon(“sniper_mp”);
self switchtoweapon(“sniper_mp”);

Change “sniper_mp” to one of the following snipers:
m40a3_mp
m21_mp
dragunov_mp
remington700_mp
barrett_mp

For example if you choose barrett it should look like:

self takeallWeapons();
self giveWeapon(“barrett_mp”);
self givemaxammo(“barrett_mp”);
self SetSpawnWeapon(“barrett_mp”);
self switchtoweapon(“barrett_mp”);

Thank you very much friend everything works perfect

1 Like

Hey, how’s it going, friend?

Why are my bots spawning without weapons?

Greetings and Merry Christmas!

well that really depends on what you have done since the last post just over 3years ago :slight_smile:

1 Like

Hi friend. I’m trying to add bots to the Extreme 2.0 mod because with version 3.0 the server crashes and I get a lot of script runtime errors. Version 2.0 works fine, but the bots spawn without weapons.

Thanks and regards.

Well it sounds like a compatibility issue between the mod and Botwarfare. As I have never used that mod before I can’t offer any solutions.

Sorry