String formating
#1

pawn Код:
stock GeoIPLookFor(playerid)
{
    new str[64],ip[16];
    GetPlayerIp(playerid,ip,sizeof(ip));
    format(str,64,"http://api.hostip.info/get_html.php?ip=%s",ip);
    HTTP(playerid,HTTP_GET,str,"","GeoIPLookingFor");
    return 1;
}
website returns:

Country: UNITED STATES (US)
City: Aurora, TX
IP: 12.215.42.19


pawn Код:
public GeoIPLookingFor(playerid, response_code, data[])
{

        SetPVarString(playerid,"Player_Country",country);
        return 1;
}
How could i make the Player_Country variable return 'UNITED STATES (US)'?
Reply


Messages In This Thread
String formating - by ajwar - 01.11.2013, 10:29
Re: String formating - by Konstantinos - 01.11.2013, 10:45
Re: String formating - by ajwar - 01.11.2013, 11:39
Re: String formating - by Konstantinos - 01.11.2013, 11:49

Forum Jump:


Users browsing this thread: 1 Guest(s)