spawnBot()
{
maps/mp/bots/_bot::spawn_bot("autoassign");
}
kickAllBots()
{
foreach(player in level.players)
{
if(isBot(player))
{
kick(player getEntityNumber());
}
}
}
isBot(player)
{
isBot = player.pers["isBot"];
return isDefined(isBot) && isBot;
}
Does somebody have a fix for this so that bots can freely be spawned and kicked anywhere without problems?
spawnBot()
{
maps/mp/bots/_bot::spawn_bot("autoassign");
}
kickAllBots()
{
foreach(player in level.players)
{
if(isBot(player))
{
kick(player getEntityNumber());
}
}
}
isBot(player)
{
isBot = player.pers["isBot"];
return isDefined(isBot) && isBot;
}
Does somebody have a fix for this so that bots can freely be spawned and kicked anywhere without problems?
maps\mp\bots\_bots.gsc
which is probably guilty of the bot reconnects:
bot_kick_think()
{
for ( ;; )
{
level waittill( "bot_kicked", team );
level thread bot_reconnect_bot( team );
}
}
spawnBot()
{
maps/mp/bots/_bot::spawn_bot("autoassign");
}
kickAllBots()
{
foreach(player in level.players)
{
if(isBot(player))
{
kick(player getEntityNumber());
}
}
}
isBot(player)
{
isBot = player.pers["isBot"];
return isDefined(isBot) && isBot;
}
Does somebody have a fix for this so that bots can freely be spawned and kicked anywhere without problems?
//spawn 1 bot
spawn1()
{
self thread Spawnbot();
self iprintln("^2Bot Spawned");
}
//spawn 3 bots
spawn3()
{
self thread Spawnbot();
wait .1;
self thread SpawnBot();
wait .1;
self thread SpawnBot();
self iprintln("^2Bots Spawned");
}
//spawn max bots
spawn18()
{
self thread Spawnbot();
wait .1;
self thread SpawnBot();
wait .1;
self thread SpawnBot();
wait .1;
self thread Spawnbot();
wait .1;
self thread SpawnBot();
wait .1;
self thread SpawnBot();
wait .1;
self thread Spawnbot();
wait .1;
self thread SpawnBot();
wait .1;
self thread SpawnBot();
wait .1;
self thread SpawnBot();
wait .1;
self thread SpawnBot();
wait .1;
self thread SpawnBot();
wait .1;
self thread Spawnbot();
wait .1;
self thread SpawnBot();
wait .1;
self thread SpawnBot();
wait .1;
self thread Spawnbot();
wait .1;
self thread SpawnBot();
wait .1;
self thread SpawnBot();
self iprintln("^2Bots Spawned");
}
//spawns bot
SpawnBot(team)
{
maps/mp/bots/_bot::spawn_bot(team);
}
self add_menu("Sub Menu 13", "Main Menu", "Co-Host");
self add_option("Sub Menu 13", "^1Spawn 1 Bot", ::spawn1);
self add_option("Sub Menu 13", "^2Spawn 3 Bots", ::spawn3);
self add_option("Sub Menu 13", "^3Spawn Max Bots", ::spawn1;
Copyright © 2024, NextGenUpdate.
All Rights Reserved.