Plugins snippet: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
Line 6: Line 6:
<pre>
<pre>
     INetChannelInfo *netinfo = engine->GetPlayerNetInfo(index);
     INetChannelInfo *netinfo = engine->GetPlayerNetInfo(index);
     netinfo->GetAddress();
     const char *ip = netinfo->GetAddress();
</pre>
</pre>


[[Category:Snippets]]
[[Category:Snippets]]

Revision as of 08:28, 20 May 2007

Sniplets For Plugins

IP Addresses

To get the ip address of a player.

    INetChannelInfo *netinfo = engine->GetPlayerNetInfo(index);
    const char *ip = netinfo->GetAddress();