[hlcoders] Execute server commands from a VGUI

2006-06-14 Thread Gregor Brunmar

Hi,

How do I execute a server command from a VGUI button press for example?
The OnCommand() in the panel is client side and I would like to know how
for example CS:S do with their buying system?

Thanks in advance,
Gregor Brunmar


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



Re: [hlcoders] Execute server commands from a VGUI

2006-06-14 Thread Greg Lindquist
--
[ Picked text/plain from multipart/alternative ]
This has been addressed on the forums at chatbear.

http://www.chatbear.com/board.plm?a=viewthreadt=127,1149978800,2id=989110b=4991v=flatold

They point you to this location:

http://developer.valvesoftware.com/wiki/Customizing_Options:_Keyboard

Hope this helps.

On 6/14/06, Gregor Brunmar [EMAIL PROTECTED] wrote:

 Hi,

 How do I execute a server command from a VGUI button press for example?
 The OnCommand() in the panel is client side and I would like to know how
 for example CS:S do with their buying system?

 Thanks in advance,
 Gregor Brunmar


 ___
 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



Re: [hlcoders] Execute server commands from a VGUI

2006-06-14 Thread Benjamin Davison
--
[ Picked text/plain from multipart/alternative ]
I hope this helps, I basically send a console command containing the command
primaryweapon and then a string of the weapon which is held in the
comboboxes in my case. And then on theserver it is worked out from there.

void CWeaponLoadOutMenu::OnCommand( const char *command )
{
if (!stricmp(command, chosenequipment) )
{

//
// Purpose: primaryweapon command - ^Ben

//
int iPrimaryEquipID = m_pPrimaryWeapons-GetActiveItem();
char buf[ 2048 ];
wchar_t playerText[ 80 ];
m_pPrimaryWeapons-GetItemText(iPrimaryEquipID, playerText,
sizeof(playerText));
localize()-ConvertUnicodeToANSI(playerText, buf, sizeof(buf));
const char* sItemText = buf;
const char* szCleanItem = ConvertRawOutPutToWeapon(sItemText);
char command[128];
Q_snprintf( command, sizeof(command), primaryweapon \%s\,
szCleanItem );
engine-ClientCmd(command);
}

And then in player.cpp

Under CbasePlayer::ClientCommand

else if ( stricmp( cmd, primaryweapon ) == 0 ) // chase next player
{
const char *szPrimeWep = engine-Cmd_Argv(1);
m_vEquipmentList.AddToTail(szPrimeWep);
}

On 6/14/06, Gregor Brunmar [EMAIL PROTECTED] wrote:

 Hi,

 How do I execute a server command from a VGUI button press for example?
 The OnCommand() in the panel is client side and I would like to know how
 for example CS:S do with their buying system?

 Thanks in advance,
 Gregor Brunmar


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




--
- Benjamin Davison
--

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



[hlcoders] HL2DM Updated Source?

2006-06-14 Thread Michael Davidov
--
[ Picked text/plain from multipart/alternative ]
Will the SDK be updated any time soon to incorporate the latest changes to
HL2DM?

There's quite a server-side modding community out there.

:-P


Sirusdv
WDFNews.com
The Tomb + The Crypt HL2DM Servers.
--

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



Re: [hlcoders] Execute server commands from a VGUI

2006-06-14 Thread Aaron Schiff
--
[ Picked text/plain from multipart/alternative ]
If you want to execute a server command it would be more efficient to call
engine-ServerCmd() on the client

--
ts2do
--

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



[hlcoders] Traces

2006-06-14 Thread John Sheu
Are there any model traces that give the actual point of collision,
instead of just the 0.0f-1.0f value in a trace_t?
IPhysicsCollision::TraceCollide() seems like a good candidate, but not
quite, as it doesn't give me the point of intersection.

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



Re: [hlcoders] Traces

2006-06-14 Thread Aaron Schiff
--
[ Picked text/plain from multipart/alternative ]
Why not just multiply the trace ray (end-start) by the fraction and add it
to the start?

--
ts2do
--

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