ServerActivate() is not good to get bot edicts, you can't get the bots edicts at all from it, ClientPutInServer() is not usefull because you must call it for each bot, this function is not called auto when you create the bot with the engine. I suggest to do the edicts update and checks in start frame, and to spawn the bots in their own BotThink() function.
put that in the begining of start frame:
Code:
for (int iPlayerIndex = 1; iPlayerIndex <= gpGlobals->maxClients; iPlayerIndex++)
{
edict_t *pPlayer = INDEXENT(iPlayerIndex);
int iStoreIndex = iPlayerIndex - 1;
if (!FNullEnt(pPlayer) && !pPlayer->free && (pPlayer->v.flags & (FL_CLIENT | FL_FAKECLIENT)))
{
bots[iStoreIndex].pEdict = pPlayer;
bots[iStoreIndex].bIsUsed = TRUE;
}
else
{
bots[iStoreIndex].bIsUsed = FALSE;
bots[iStoreIndex].pEdict = NULL;
}
}
bot_t bots[32]; - make this global.