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

Reply via email to