Anyone can set admin acces for this command please ?
ADMIN_KICK
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <geoip>
#pragma semicolon 1
new const g_version[] = "1.0";
public plugin_init()
{
register_plugin( "Amx showip", g_version, "" );
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" );
client_print( i_Index, print_console, "NAME | IP | COUNTRY" );
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, "%s | %s | %s", szName, Ip, szCountry );
}
}
return PLUGIN_CONTINUE;
}