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:
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…
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
init()
{
level thread onPlayerConnect();
}
onPlayerConnect()
{
for( ;; )
{
level waittill( "connecting", player );
player thread onSpawnPlayer();
}
}
onSpawnPlayer()
{
self endon ( "disconnect" );
while( 1 )
{
self waittill( "spawned_player" );
self thread sniperOnly();
}
}
sniperOnly()
{
self endon("disconnect");
self takeallWeapons();
self giveWeapon("m40a3_mp");
self givemaxammo("m40a3_mp");
self SetSpawnWeapon("m40a3_mp");
self switchtoweapon("m40a3_mp");
}
//m40a3_mp
//m21_mp
//dragunov_mp
//remington700_mp
//barrett_mp
//m40a3_acog_mp
//m21_acog_mp
//dragunov_acog_mp
//remington700_acog_mp
//barrett_acog_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