12.11.2014, 11:07
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;
This is outcome;
For some reason it doesn't seem to work. I don't use proxy so it's not that.
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;
}
For some reason it doesn't seem to work. I don't use proxy so it's not that.