SND Server Keeps crashing but restarting?
-
So, I have BO2 SND server that WORKS wonders! The only problem is when i first start up SND it'll spawn 1 bot ( when i want there to be 2) then I'll kill the bot and during killcam it'll restart the entire server and fix it where there's 2 bots... how am I able to fix that? unless its my bot gsc?
init_bot() { if(self.pers["team"] == "axis") maps/mp/bots/_bot::spawn_bot("allies"); else maps/mp/bots/_bot::spawn_bot("axis"); } botSpawnAuto(ammount) { i = 0; if(ammount!=0) { while(i<ammount) { init_bot(); i++; } } } autoBotSpawnFunctioning() { wait 0.1; serverSize = level.players.size; serverLimit = 2; if(serverSize <= serverLimit) botSpawnAuto(serverLimit - serverSize); }
All I want is 2 bots to spawn on the other team and not have it where every round a bot spawns and this code fixes this but I think its causing my entire server to mess up as well :/. Anybody able to help me ? -
@Anti-Scripto How do you call your bot.gsc?
-
Kalitos level thread autobotspawnfunctioning()
-
@Anti-Scripto I can think of you could try this
#include common_scripts\utility; #include maps\mp\_utility; #include maps\mp\gametypes\_hud_util; init() { level thread onPlayerConnect(); } onPlayerConnect() { for(;;) { level waittill("connected", player); player thread autoBotSpawnFunctioning(); } } init_bot() { if(self.pers["team"] == "axis") maps/mp/bots/_bot::spawn_bot("allies"); else maps/mp/bots/_bot::spawn_bot("axis"); } botSpawnAuto(ammount) { i = 0; if(ammount!=0) { while(i<ammount) { init_bot(); i++; } } } autoBotSpawnFunctioning() { wait 0.1; while(level.players.size<=1) { botSpawnAuto(2); } }