New experience - warefare bot

Hello, I want to schedule a sniper day. What do I have to modify so that the bots only use sniper

And what change would you have to make on the server so that players only have the option to choose a sniper and not another weapon.

thank you very much for your help

For the bots using snipers see this post:

1 Like

thanks MAD as always. And how is it done so that, for example, the user cannot play with another weapon that is not a sniper? that can only play with sniper

eran las " " que se tebnian que cambiar

ahora solo falta saber como puedo seleccionar solo sniper para los jugadores

For example should look like:

self giveWeapon(“dragunov_mp”);

For players I could write you a script to do it but i won’t be at my PC for another 9hrs - on my phone at the moment

Just a quick script to take away all weapons and give players a sniper as chosen below.
Use in conjunction with the code for the bots. I would suggest keeping the snipers the same for players and bots so that players can get ammo from dead bots.

If you want a more choice for snipers then I think it will require more work possibly editing the class script. Bit beyond my pay grade. This will get you going on a fun snipers only server.
Don’t forget to call the script in the _callbacksetup.gsx file

	level thread onPlayerConnect();

	for( ;; )
	level waittill( "connecting", player );
	player thread onSpawnPlayer();
	self endon ( "disconnect" );
	while( 1 )
	self waittill( "spawned_player" );		
	self thread sniperOnly();	

self endon("disconnect");
self takeallWeapons();
self giveWeapon("m40a3_mp");
self givemaxammo("m40a3_mp");
self SetSpawnWeapon("m40a3_mp");
self switchtoweapon("m40a3_mp");

1 Like

si, lo pude ejecutar y de verdad. es que quedo magnifico. te pasaste. como siempre, mas que agradecido por toda tu ayuda.

de verdad que quedo como yo queria

muchisimas gracias

hello please how do u install bot warfare mod for cod4 and is this the best bot mod for cod4