I did some tinkering with that as well earlier on, but it only caused the game to crash on me.
2010/3/15 Saul Rennison <saul.renni...@gmail.com>: > If you want to get your network channel to the server, then you can use: > static_cast<INetChannel*>(engineClient->GetNetChannelInfo) > > Thanks, > - Saul. > > > On 15 March 2010 16:36, Saul Rennison <saul.renni...@gmail.com> wrote: > >> engine is a pointer to IVEngineServer-- server-side interface for accessing >> connected clients. When you're connected to another server, this interface >> is unavailable (well, returns inaccurate / NULL values). >> engineClient however is a pointer to IVEngineClient-- which is always >> valid. I have no idea how to get the INetChannel of the local client, sorry. >> >> Thanks, >> - Saul. >> >> >> >> On 15 March 2010 16:08, C-F Strid <wor...@gmail.com> wrote: >> >>> Heyo, >>> >>> I'm trying to get into C++ (having a wee bit of experience with C#) >>> and get a decent understanding of the SDK files. >>> >>> To kill two birds with one stone, I have attempted to create a >>> server-side plugin based off the "serverplugin_empty" example found in >>> the SDK. The idea is simple, I just want to hack in some extra >>> functionality for recording demos (easily distinguishable names, >>> storing them elsewhere, etc). >>> >>> I'd like to use some of the features that are part of IClient, and >>> thus I've had a go at it: >>> >>> INetChannel *pNetChan = static_cast<INetChannel >>> *>(engine->GetPlayerNetInfo(engineClient->GetLocalPlayer())); >>> if(pNetChan) >>> { >>> IClient *pClient = static_cast<IClient >>> *>(pNetChan->GetMsgHandler()); >>> >>> Msg(pClient->GetNetworkIDString()); >>> Msg(pClient->GetClientName()); >>> pClient->Reconnect(); >>> } >>> >>> This only works when I'm connected to my own listen server though. >>> >>> Anyone care to point me in the right direction? >>> >>> (I've also posted this on the official Steam forums, but there is >>> little support for client-side plugins. Most forums related to >>> developing VSP seem to be long gone, as well) >>> >>> _______________________________________________ >>> 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 > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders