I use the ClientCmd method for many of my systems, including inventory, and
it works perfectly.

On Wed, Apr 2, 2008 at 11:11 AM, Tony omega Sergi <[EMAIL PROTECTED]>
wrote:

> and why can't you pass the slot with a command?
>
> engine->ClientCmd( VarArgs("useitem %i", slot) );
>
> now in the command on the server, int slot = atoi(args[1]);
>
>
> On Wed, Apr 2, 2008 at 5:52 AM, Tom Edwards <[EMAIL PROTECTED]>
> wrote:
>
> > The problem with both of those options is that I can't send the
> > inventory slot to work on with them, and for the same reason neither can
> > I check on the client whether the command should be sent in the first
> > place.
> >
> > con_command_f is good enough for testing with (so thanks!), but I really
> > need to modify the usercmd.
> >
> > Tony "omega" Sergi wrote:
> > > You could also simply just use an impulse - and add an entry into the
> > > impulse switch statement (or add a custom one that gets checked first,
> > and
> > > then falls through to cbaseplayer)
> > >
> > > And for filtering a command to a specific player - if it's not just a
> > > command through the player, or rules;  (ie: CON_COMMAND(blah..) )
> > > CON_COMMAND_F( useitem, "use an inventory item", 0 )
> > > {
> > >     CModPlayer *pPlayer = ToModPlayer( UTIL_GetCommandClient() );
> > >     if ( pPlayer )
> > >     {
> > >     //check args here for what item it is and voila.
> > >     }
> > > }
> > >
> > > -Tony
> > > On Tue, Apr 1, 2008 at 3:16 PM, Tom Edwards <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > >
> > >> I'm adding a command to use an inventory item. The button won't ever
> > >> need to be held down.
> > >>
> > >> By actual command triggered from a bind, I take it you mean a server
> > >> concommand? How do I filter that to only the command-ing player?
> > >>
> > >>
> > >> Jeremy wrote:
> > >>
> > >>> Generally you shouldn't need to add new stuff to the user command.
> > >>>
> > >> Depends
> > >>
> > >>> what you're trying to send. There are other ways that are better for
> > >>>
> > >> most
> > >>
> > >>> cases, such as actual commands triggered from binds and such.
> > >>>
> > >>> On Tue, Apr 1, 2008 at 11:30 AM, Tony omega Sergi <
> [EMAIL PROTECTED]
> > >
> > >>> wrote:
> > >>>
> > >>>
> > >>>
> > >>>> Just stuff the data in in_main.cpp wheRE usercmd gets copied over.
> > i'm
> > >>>> on my cell so no code infront of me to tell you the exact function
> > lol
> > >>>>
> > >>>> On 4/1/08, Tom Edwards <[EMAIL PROTECTED]> wrote:
> > >>>>
> > >>>>
> > >>>>> I've worked out that user commands are transmitted with CUserCmd
> and
> > >>>>> processed on the server with CPlayerMove, but how to access
> CUserCmd
> > >>>>>
> > >> on
> > >>
> > >>>>> the client and pass it values is beyond me. Can anyone advise?
> > >>>>>
> > >>>>>
> > >>>>> ________
> > >>>>>
> > > _______________________________________________
> > > 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
> >
> >
>
>
> --
> -omega
> _______________________________________________
> 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