GeoIP2 is now available at
http://amxmodx.org/snapshots.php.
Create a file like JoinIP.sma inside 'scripting' folder and fill it up with the code below.
PHP Code:
#include amxmodx
#include geoip
public client_putinserver(i)
{
static a[64], b[64], c[64], w[64], x;
get_user_name(i, w, 63);
get_user_ip(i, a, 63, 1);
x=geoip_country(a, b, 63); if (!x) b = "N/A";
x=geoip_city(a, c, 63); if (!x) c = "N/A";
client_print(0, print_chat, "%s connected from %s (city), %s (country)", w, c, b);
}
http://dev.maxmind.com/geoip/geoip2/geolite2/
Download GeoLite City, extract it and place it inside 'data' directory.
All done.
__________________