Hello, I'm trying to get player's country with geoip but it's not working, it's always returning 0. Besides, I'm using amxx 1.9.0 (latest)
Code:
public client_putinserver(this)
{
if (is_user_bot(this))
return;
if (is_user_hltv(this))
return;
new szName[32], szCountry[32], szIp[32];
get_user_name(this, szName, charsmax(szName));
get_user_ip(this, szIp, charsmax(szIp), 1);
if (geoip_country_ex(szIp, szCountry, charsmax(szCountry)) == 0)
copy(szCountry, charsmax(szCountry), "N/A");
client_print(0, print_chat, "Player %s has connected (%s).", szName, szCountry);
}
__________________