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
}
}
}
}
NOTE : This code does not work ! I have try it for many times ! Why this happen , please help me to fix this error !:'(