PHP Code:
#include < amxmodx >
public plugin_init()
{
register_clcmd("say /info", "ClCmd_Say_Info");
}
GGETPLAYERAUTHID(id, bGet = false)
{
static szAuthid[33][32];
if( bGet )
{
get_user_authid(id, szAuthid[id], charsmax(szAuthid[]));
}
return szAuthid[id];
}
public client_connect(id)
{
GETPLAYERIP(id, true);
}
public client_authorized(id)
{
GGETPLAYERAUTHID(id, true);
}
GETPLAYERAUTHID(id, bGet = false)
{
static szAuthid[33][32];
if( bGet )
{
get_user_authid(id, szAuthid[id], charsmax(szAuthid[]));
}
return szAuthid[id];
}
GETPLAYERIP(id, bGet = false)
{
static szAddress[33][16];
if( bGet )
{
get_user_ip(id, szAddress[id], charsmax(szAddress[]), 1);
}
return szAddress[id];
}
public ClCmd_Say_Info(id)
{
client_print(id, print_chat, "Your IP is ^"%s^" and your SteamID is ^"%s^"", GETPLAYERIP(id), GETPLAYERAUTHID(id));
}
// function in which you need to use steamid more that one and ip more than once :
public function( id )
{
static szAuthid[32], szIp[16];
szAuthid = GETPLAYERAUTHID(id);
szIp = GETPLAYERIP(id);
if( !('0' <= szAuthid[10] <= '9') && !IsLocalIp( szIp ) )
{
client_print(id, print_chat, "Your IP is ^"%s^" and your SteamID is ^"%s^" tell us you are not using steam", szIp, szAuthid);
}
}
IsLocalIp( const IP[] )
{
return false;
}
__________________