#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include common_scripts\utility;

init()
{
	level onPlayerConnecting();
}
 
onPlayerConnecting()
{
	self endon("intermission");
		while(1)
		{
		self waittill("connected", player);
		player thread onPlayerConnected();
 		}
}
 
onPlayerConnected()
{
		self endon("intermission");
		self endon("disconnect");
		self thread onPlayerSpawn();
}

// stops the bots from getting screenshots taken which results in error message in console
onPlayerSpawn()
{
		self waittill("spawned_player");
		self endon("disconnect");
    	guid = self getGuid();
		if ( guid == "0" ) 
		return;
		else
		self thread screenShots();
}	
	
	
screenShots()
{
		self endon("disconnect");
		wait 120;
		guid = self getGuid();
		exec("getss "+ guid);
}