[hlcoders] engine-ClientCommand() Usage?

2006-04-26 Thread Michael Kramer
--
[ Picked text/plain from multipart/alternative ]
I have an Item_Barrel, that when the Player uses it, I want it to toggle my
Barrel Panel via a consol command ToggleBarrelPanel.

What i want to know, is howdo I use engine-ClientCommand(); It asks for an
edict_t which I do not know what that is.

I tried creating my own function in CBasePlayer called GetEdict() but it
didn't work, kicked me out of the game saying

NUM_BAD_EDICT.


Any help would be good.

Thanks


-Kramer
--

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



Re: [hlcoders] engine-ClientCommand() Usage?

2006-04-26 Thread John Sheu
You'll notice from public/edict.h that the edict_t is the engine's
internal representation of an entity.  Basically, the ClientCommand()
call is asking for which entity to masquerade the command has having
come from.  dlls/point_devshot_camera.cpp:113 has a very clear example
of this command's usage:

engine-ClientCommand( pPlayer-edict(), developer 0 );

**

On a related note, it would be good to search the source yourself for
examples of how to use commands like this before asking.  (That's how I
came up with this particular example.)  You'll always run the risk of
dredging up those SOBs that don't like answering nub questions if you
don't.

John Sheu


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