SA-MP Forums Archive
GeoIP returning Unkown when requesting for country - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GeoIP returning Unkown when requesting for country (/showthread.php?tid=546032)



GeoIP returning Unkown when requesting for country - Capua - 12.11.2014

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.


Re: GeoIP returning Unkown when requesting for country - biker122 - 12.11.2014

Are you trying it on your localhost?


Re: GeoIP returning Unkown when requesting for country - Capua - 12.11.2014

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


Re: GeoIP returning Unkown when requesting for country - Capua - 12.11.2014

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