View Single Post
Re: Problem with kicking bots
Old
  (#11)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: Problem with kicking bots - 24-10-2004

Quote:
Originally Posted by botmeister
Guys, pb remove #bot_team does not work with Podbot-r2.44-linux-so.
OK - for team argument don't use "#"

Use for kicking:
a)T bot:
pb remove 1
and the first T bot from the list will be kicked
b) CT bot
pb remove 2
and the first CT bot from the list will be kicked

I've just tried this about 6 times - to be sure. Also I was looking a bit into code and it's probably this part (dll.cpp - PbCmdParser):

PHP Code:
      // "remove" removes a bot
       
else if (FStrEq (pcmdg_pszPbCmds[PBCMD_REMOVE]))
       {
          if ((
arg1 != NULL) && (*arg1 != 0))
             
iTeam atoi (arg1);
          else
             
iTeam 0;
    
          if ((
arg2 != NULL) && (*arg2 != 0))
             
iSelection atoi (arg2);
          else
             
iSelection 0;
    
          if ((
iTeam == TEAM_CS_TERRORIST) || (iTeam == TEAM_CS_COUNTER))
          {
             for (
index 0index gpGlobals->maxClientsindex++)
             if (
bots[index].is_used && !FNullEnt (bots[index].pEdict) && (bots[index].bot_team == iTeam))
                {
                   
g_iPeoBotsKept--;
              
snprintf (kickcmdsizeof (kickcmd), "kick \"%s\"\n"STRING (bots[index].pEdict->v.netname));
                   
SERVER_COMMAND (kickcmd);
                   if (
index >= iSelection)
                      break;
                }
          }
          else
          {
             for (
index 0index gpGlobals->maxClientsindex++)
             if (
bots[index].is_used && !FNullEnt (bots[index].pEdict))
                {
                   
g_iPeoBotsKept--;
              
snprintf (kickcmdsizeof (kickcmd), "kick \"%s\"\n"STRING (bots[index].pEdict->v.netname));
                   
SERVER_COMMAND (kickcmd);
                   if (
index >= iSelection)
                      break;
                }
          }
       } 
[EDIT]
Seems like 'code' doesn't work correctly (all was in 1 line) - that's why I used 'php'.
[/EDIT]

Last edited by KWo; 24-10-2004 at 17:47..
  
Reply With Quote