the code is a mess but if you understand coding follow this
Code:
enum _:displayCountry{
ip[MAX_NAME_LENGTH]
city[45],
country[45],
ping,
loss
}
new player_info[MAX_PLAYERS + 1][displayCountry]
public xClientPutInServer(id)
{
get_user_ip(id, player_info[id][ip], charsmax(player_info[][ip]), 1)
if (geoip_country_ex(player_info[id][ip], player_info[id][country], charsmax(player_info[][country])))
{
geoip_city(player_info[id][ip], player_info[id][city], charsmax(player_info[][city]))
}
}
public xHudInfo(id)
{
static country_text[128]
if (player_info[id][city][0] != EOS)
copy(country_text, charsmax(country_text), player_info[id][city])
if (player_info[id][country][0] != EOS)
add(country_text, charsmax(country_text), "%s%s | %d", player_info[id][city][0] != EOS ? ", " : "", player_info[id][city], player_info[id][ping])
ShowSyncHudMsg(id, xMsgSync[0], "..^n%s", .., country_text)
}
__________________