Sure, here it is:
Code:
void pfnMessageBegin(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed) {
int index = -1;
LOG_CONSOLE(PLID, "Message \"%s\"sent to ID %d.", GET_USER_MSG_NAME(PLID, msg_type, NULL), msg_dest);
if (ed) {
// Get the index of the bot this message is meant for (if any)
index = UTIL_GetBotIndex(ed);
// If this message is meant for a bot, index != -1
if (index != -1) {
botMsgIndex = index;
if (msg_type == GET_USER_MSG_ID (PLID, "VGUIMenu", NULL)) {
LOG_CONSOLE(PLID, "VGUI message; setting botMsgFunction\n");
botMsgFunction = BotClient_VGUI;
}
else if (msg_type == GET_USER_MSG_ID (PLID, "ShowMenu", NULL))
LOG_CONSOLE(PLID, "ShowMenu message intercepted.\n"); //botMsgFunction = BotClient_CS_ShowMenu;
else if (msg_type == GET_USER_MSG_ID (PLID, "WeaponList", NULL)) // Tells us about what weapons we (have? can get?)
LOG_CONSOLE(PLID, "WeaponList message intercepted.\n"); //botMsgFunction = BotClient_CS_WeaponList;
else if (msg_type == GET_USER_MSG_ID (PLID, "CurWeapon", NULL))
LOG_CONSOLE(PLID, "CurWeapon message intercepted.\n"); //botMsgFunction = BotClient_CS_CurrentWeapon;
else if (msg_type == GET_USER_MSG_ID (PLID, "AmmoX", NULL))
LOG_CONSOLE(PLID, "AmmoX message intercepted.\n"); //botMsgFunction = BotClient_CS_AmmoX;
else if (msg_type == GET_USER_MSG_ID (PLID, "WeapPickup", NULL))
LOG_CONSOLE(PLID, "WeapPickup message intercepted.\n"); //botMsgFunction = BotClient_CS_WeaponPickup;
else if (msg_type == GET_USER_MSG_ID (PLID, "AmmoPickup", NULL))
LOG_CONSOLE(PLID, "AmmoPickup message intercepted.\n"); //botMsgFunction = BotClient_CS_AmmoPickup;
else if (msg_type == GET_USER_MSG_ID (PLID, "ItemPickup", NULL))
LOG_CONSOLE(PLID, "ItemPickup message intercepted.\n"); //botMsgFunction = BotClient_CS_ItemPickup;
else if (msg_type == GET_USER_MSG_ID (PLID, "Health", NULL))
LOG_CONSOLE(PLID, "Health message intercepted.\n"); //botMsgFunction = BotClient_CS_Health;
else if (msg_type == GET_USER_MSG_ID (PLID, "Battery", NULL))
LOG_CONSOLE(PLID, "Battery message intercepted.\n"); //botMsgFunction = BotClient_CS_Battery;
else if (msg_type == GET_USER_MSG_ID (PLID, "Damage", NULL))
LOG_CONSOLE(PLID, "Damage message intercepted.\n"); //botMsgFunction = BotClient_CS_Damage;
else if (msg_type == GET_USER_MSG_ID (PLID, "Money", NULL))
LOG_CONSOLE(PLID, "Money message intercepted.\n"); //botMsgFunction = BotClient_CS_Money;
else if (msg_type == GET_USER_MSG_ID (PLID, "ScreenFade", NULL))
LOG_CONSOLE(PLID, "ScreenFade message intercepted.\n"); //botMsgFunction = BotClient_CS_ScreenFade;
}
}
RETURN_META(MRES_IGNORED);
}
Anything looking blatently wrong here? Also, I'm using CS 1.6- have the procedures for selecting teams and buying weapons changed significantly?
Thanks again.
-JB