Raised This Month: $ Target: $400
 0% 

[REQUEST] ShowIP


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Adryyy
Member
Join Date: Oct 2011
Old 08-25-2016 , 17:04   [REQUEST] ShowIP
Reply With Quote #1

Hi, i have this code

Code:
#include <amxmodx>
#include <amxmisc>
#include <geoip>

#pragma semicolon 1

new const g_version[] = "0.1";

public plugin_init()
{
    register_plugin( "ShowIP", g_version, "compaq" );

    register_concmd( "amx_showip", "cmdShow", 0 );
}

public cmdShow( i_Index, iLevel, iCid )
{
    if( !cmd_access( i_Index, iLevel, iCid, 0 ) )
    {
        return PLUGIN_HANDLED;
    }

    static iPlayers[ 32 ], iNum, i, Index;
    get_players( iPlayers, iNum, "c" );

    for( i = 0; i < iNum; i++ )
    {
        Index = iPlayers[ i ];

        if( is_user_connected( Index ) )
        {
            static szName[ 33 ], Ip[ 33 ], szCountry[ 46 ];
            get_user_name( Index, szName, charsmax( szName ) );
            get_user_ip( Index, Ip, charsmax( Ip ) );
            geoip_country( Ip, szCountry, charsmax( szCountry ) );

            client_print( i_Index, print_console, "IP | Country" );
            client_print( i_Index, print_console, "%s | %s", szName, szCountry );
        }
    }

    return PLUGIN_CONTINUE;
}
You can do the maximum to display 5? Like 'amx_help' pages

Last edited by Adryyy; 08-26-2016 at 15:49.
Adryyy is offline
Send a message via Yahoo to Adryyy Send a message via Skype™ to Adryyy
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode