Quote Originally Posted by IzNoGoD View Post
Ok, that wasnt "today". Here is script anyway:
Code:
preventbotspec()
{
	while(true)
	{
		if(isdefined(self.pers["team"]) && self.pers["team"] == "spectator")
		{
			cl = self getspectatorclient();
			if(isdefined(cl) && cl != self)
			{
				if(cl.isbot)
				{
					players = getentarray("player", "classname");
					found = false;
					tospec = -1;
					for(i = 0; i < players.size; i++)
					{
						if(players[i] == self)
							continue;
						if(tospec == -1 && !players[i].isbot)
							tospec = players[i] getentitynumber();
						if(!found)
						{
							if(players[i] == cl)
								found = true;
						}
						else if(!players[i].isbot)
						{
							tospec = i;
							break;
						}
					}
					self.spectatorclient = tospec;
				}
			}
		}
		wait .05;
	}
}
requires libcod, untested code
Silly question but where do you need to put this function in order to get it working?