Its all in the client command function.

void ClientCommand( edict_t *pEntity )
{

 int i=0; //Holds the number of clients.

 const char *pcmd = Cmd_Argv(0); //Holds arg1
 const char *arg1 = Cmd_Argv(1); //Holds arg2
 const char *arg2 = Cmd_Argv(2); //Holds arg3
 const char *arg3 = Cmd_Argv(3); //Holds arg4
 const char *arg4 = Cmd_Argv(4); //Holds arg5
 const char *arg5 = Cmd_Argv(5); //Holds arg6
 const char *arg6 = Cmd_Argv(6); //Holds arg7

 //char msg[80];

}
----- Original Message -----
From: "_Phantom_" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 24, 2002 5:30 AM
Subject: Re: [hlcoders] server crash's with bots and clients


> >From you code below :
>
>  BotCreate( NULL, arg1, arg2, arg3, arg4 );
>
> Where is arg1 -> 4 setup?
>
> ----- Original Message -----
> From: "SmiLeY" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, February 24, 2002 4:48 AM
> Subject: [hlcoders] server crash's with bots and clients
>
>
> > This is a multi-part message in MIME format.
> > --
> > [ Picked text/plain from multipart/alternative ]
> > If a client enters addbot into the console the server will crash.
> > why would this happen?
> >
> > i want a bot to be added when a client enters addbot on a dedicated
> server?
> >
> >  if (FStrEq(pcmd, "addbot"))
> >    {
> >    for (i=0; i < 32; i++)
> >    {
> >     if ((the_player_admin_s[i].is_used == TRUE) &&
> (the_player_admin_s[i].pEdict == pEntity) &&
> (the_player_admin_s[i].was_admin==TRUE))
> >     {
> >      BotCreate( NULL, arg1, arg2, arg3, arg4 );
> >      // have to delay here or engine gives "Tried to write to
> >      // uninitialized sizebuf_t" error and crashes...
> >     // bot_cfg_pause_time = gpGlobals->time + 2.0;
> >      bot_check_time = gpGlobals->time + 5.0;
> >      return;
> >     }
> >     else
> >     {
> >      ClientPrint(pEntity, HUD_PRINTCONSOLE, "You do not have access to
> this command.\n");
> >      return;
> >     }
> >
> >     break;
> >    }
> >
> >    return;
> >    }
> >
> >
> > --
> >
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
>


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to