View Single Post
Re: hpb template 4 metamod & cleaned
Old
  (#23)
Rifleman
This user broke our rules and has been BANNED
 
Status: Offline
Posts: 128
Join Date: Sep 2004
Location: Mars
Default Re: hpb template 4 metamod & cleaned - 27-12-2004

no it isn't , your pfnStart.. should look like this , for CS

Code:
  if (ed)
	  {
	 index = UTIL_GetBotIndex (ed);
   
   // is this message for a bot?
   if (index != -1)
   {
	botMsgFunction = NULL;	 // no msg function until known otherwise
	botMsgEndFunction = NULL;  // no msg end function until known otherwise
	botMsgIndex = index;	   // index of bot receiving message
	
	if (msg_type == GET_USER_MSG_ID (PLID, "VGUIMenu", NULL))
	 botMsgFunction = BotClient_CS_VGUI;
	else if (msg_type == GET_USER_MSG_ID (PLID, "ShowMenu", NULL))
	 botMsgFunction = BotClient_CS_ShowMenu;
	else if (msg_type == GET_USER_MSG_ID (PLID, "CurWeapon", NULL))
	 botMsgFunction = BotClient_CS_CurrentWeapon;
	else if (msg_type == GET_USER_MSG_ID (PLID, "AmmoX", NULL))
	 botMsgFunction = BotClient_CS_AmmoX;
	else if (msg_type == GET_USER_MSG_ID (PLID, "AmmoPickup", NULL))
	 botMsgFunction = BotClient_CS_AmmoPickup;
	else if (msg_type == GET_USER_MSG_ID (PLID, "Damage", NULL))
	 botMsgFunction = BotClient_CS_Damage;
	else if (msg_type == GET_USER_MSG_ID (PLID, "Money", NULL))
	 botMsgFunction = BotClient_CS_Money;
	else if (msg_type == GET_USER_MSG_ID (PLID, "ScreenFade", NULL))
	 botMsgFunction = BotClient_CS_ScreenFade;
			}
	  }
   else if (msg_dest == MSG_ALL)
	  {
		 botMsgFunction = NULL;  // no msg function until known otherwise
		 botMsgIndex = -1;	   // index of bot receiving message (none)
   
		 if (msg_type == GET_USER_MSG_ID (PLID, "DeathMsg", NULL))
			botMsgFunction = BotClient_CS_DeathMsg;
	  }
   else
   {
   // Steam makes the WeaponList message be sent differently
		 botMsgFunction = NULL;  // no msg function until known otherwise
		 botMsgIndex = -1;	   // index of bot receiving message (none)
   if (msg_type == GET_USER_MSG_ID (PLID, "WeaponList", NULL))
	  botMsgFunction = BotClient_CS_WeaponList;
		 else if (msg_type == GET_USER_MSG_ID (PLID, "HLTV", NULL))
   botMsgFunction = BotClient_CS_HLTV;
   }
And theres some problem with the template hltv intercepting function (bot_client.cpp) , look for fixed one in the HPB_bot forum

And yes , another big bug in your template , all command like "waypoint" , "pathwaypoint", "observer" etc etc are unusable , only those you register with metamod is usable
  
Reply With Quote