View Single Post
Re: BotClient_CS_HLTV in HPB_template 4 does not work !
Old
  (#3)
Rifleman
This user broke our rules and has been BANNED
 
Status: Offline
Posts: 128
Join Date: Sep 2004
Location: Mars
Default Re: BotClient_CS_HLTV in HPB_template 4 does not work ! - 07-11-2004


Code:
void BotClient_CS_HLTV(void *p, int bot_index)
{
   static int state = 0;   // current state machine state
   static int players;
   int index;
   
   if (state == 0)
	  players = *(int *) p;
   else if (state == 1)
   {
	  // new round in CS 1.6
	  if ((players == 0) && (*(int *) p == 0))
	  {
		 for (index = 0; index < 32; index++)
		 {
			if (bots[index].is_used)
			{
			   BotSpawnInit (&bots[index]); // reset bots for new round   
			   PrintMessage("Round ended\n");
			}
		 }
	  }
   }
}


Okay okay , when I put a PrintMessage function (the function print some kind of text to a file) , I found that the botspawninit are not called for the bot , I dont know why , but I think the problem comes from the code since I sure that there are no problem with the function code

Last edited by Rifleman; 07-11-2004 at 15:51..
  
Reply With Quote