GeoIP returning Unkown when requesting for country
#1

So I made a command to get the country of a player using GeoIP include.
I have extracted the include file inside pawno includes, also the database files are in scriptfiles.

The code looks following;
pawn Код:
CMD:getplayerinfo(playerid, params[])
{
    new id;
    if (sscanf(params,"u",id))
        return SendClientMessage(playerid,-1,"USAGE: /getplayerinfo [ID]");
    new country[40];
    new string[95];
    GetPlayerCountry(playerid, country, sizeof(country));
    String("%s lives in %s", gPlayerInfo[id][pName], country);
    SendClientMessage(playerid, -1, string);
    return 1;
}
This is outcome;


For some reason it doesn't seem to work. I don't use proxy so it's not that.
Reply
#2

Are you trying it on your localhost?
Reply
#3

No I log in from public. GetPlayerIp works well and it displays the IP, but seemingly GetPlayerCountry is not retreiving country data.
Reply
#4

I added GetPlayerISP and even getting internet service provider works but for some weird reason the country is Unknown.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)