--
[ Picked text/plain from multipart/alternative ]
There should be some example VGUI panels in the HL2DM sdk code. Try looking
in client_sdk/game_controls
look for a function
engine->ClientCmd ( pCommand );

where pCommand is the name of a function call on the server side (eg:
"changeteam 1")

On the server side, clientcmd invokes a function
CSDKPlayer::ClientCommand    (the class name might be different in HL2DM)

Take a look at some of the existing commands in this function as it will
give you a good base on how to create new commands.


----- Original Message -----
From: "Chad Lehman" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, December 08, 2007 7:09 PM
Subject: [hlcoders] [mod] VGUI button press


--
[ Picked text/plain from multipart/alternative ]

Hello,

Please help with my impending ulcer :)

My friends and I have been modding HL2 Deathmatch (a capture the flag
variety) to pop up a VGUI panel when the player first touches a flag.

Depending on the button pressed, the player can either receive the flag or
be thrown back.

We can't seem to get the button press code back into the server, where the
reward/punishment will be dished out. In other words, pressing a button
creates either a "true" or "false" that we want to send back to the server.

Right now, we signal the VGUI (existing in the client) by sending a user
message from the server. The box pops up. We just can't figure out how to
get the button press to do anything except return a value in the client.

 (optionally) we could load the options for each button the server, and send
them via message to the client. This way, we can check for "true/false" in
the server, and the client would only serve to send back a button press.


We're just unsure how to do that--how to signal the server which option
(button) was pressed--or if that's even the right way to think about it.



Thank you so much for your help... hopefully, my friends wife won't be
leaving him as a result of all this frustration :)


Chad Lehman


_________________________________________________________________
Connect and share in new ways with Windows Live.
http://www.windowslive.com/connect.html?ocid=TXT_TAGLM_Wave2_newways_112007
--

_______________________________________________
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