.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   hpb template 4 metamod & cleaned (http://forums.bots-united.com/showthread.php?t=3266)

dub 27-12-2004 02:15

Re: hpb template 4 metamod & cleaned
 
my bad typo error "HTLV" to "HLTV" all is fixed now.

Rifleman 27-12-2004 02:38

Re: hpb template 4 metamod & cleaned
 
Why always double-post ??!! Ignore this

Rifleman 27-12-2004 02:39

Re: hpb template 4 metamod & cleaned
 
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

dub 28-12-2004 14:19

Re: hpb template 4 metamod & cleaned
 
uploaded a fixed version, hltv message bug fixed & added a simple cmd parser
the only major problem is steam keeps exiting cs when i start up a lan server similar to what happens with an invalid game dll in liblist.gam maybe it`s a buffer overrun in metamod because the dir is very deep for steam.


All times are GMT +2. The time now is 09:26.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.