Quote:
Originally Posted by Calisthenics
Database files in correct place, correct permissions to read from scriptfiles and connected (in case you use it on another player). Here is a sample with correct output:
pawn Code:
#include <a_samp> #include <sscanf2> #include <geolite> #include <zcmd>
enum e_PlayerInfo { GeoCountry[MAX_COUNTRY_LENGTH], GeoCity[MAX_CITY_LENGTH] };
new PlayerInfo[MAX_PLAYERS][e_PlayerInfo];
CMD:mycountry(playerid, params[]) { if (isnull(PlayerInfo[playerid][GeoCountry]) && isnull(PlayerInfo[playerid][GeoCity])) { GetPlayerCountry(playerid, PlayerInfo[playerid][GeoCountry], MAX_COUNTRY_LENGTH); GetPlayerCity(playerid, PlayerInfo[playerid][GeoCity], MAX_CITY_LENGTH); } printf("Country: %s, City: %s", PlayerInfo[playerid][GeoCountry], PlayerInfo[playerid][GeoCity]); return 1; }
|
My VPS was blocked the db files to be readed... now is working! Thank You!