Plugins snippet: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 5: Line 5:


<pre>
<pre>
    int index = engine->IndexOfEdict(pEntity);
     INetChannelInfo *netinfo = engine->GetPlayerNetInfo(index);
     INetChannelInfo *netinfo = engine->GetPlayerNetInfo(index);
     const char *ip = netinfo->GetAddress();
     const char *ip = netinfo->GetAddress();

Revision as of 08:29, 20 May 2007

Sniplets For Plugins

IP Addresses

To get the ip address of a player.

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