It shows me the wrong information
#5

And how to so?
Ps - here is the country function:
Edit: no,still doesnt work
PHP код:
GetPlayerCountry(playerid,Country[256]){
       new 
IPAddress[256];
       new 
a,b,c,d,ipf;
       new 
File:IPFile;
       new 
Text[256],start,end;
       
GetPlayerIp(playerid,IPAddress,sizeof(IPAddress));
       
GetParams(IPAddress);
       
a=strval(Params[0]);
       
b=strval(Params[1]);
       
c=strval(Params[2]);
       
d=strval(Params[3]);
       if(
a==127 && b==&& c==&& d==1){
           
format(Country,sizeof(Country),"Localhost");
           return 
1;
       }
       
ipf = (16777216*a) + (65536*b) + (256*c) + d;
       if(!
fexist("CountriesIPs/IPLIST.csv")) return SendClientMessage(playerid,0xFF0000FF,"Country file not found.");
       
IPFile=fopen("CountriesIPs/IPLIST.csv",io_read);
       
fread(IPFile,Text,sizeof(Text),false);
    while(
strlen(Text)>0){
        
GetFileData(Text);
        
start=strval(FileData[0]);
        
end=strval(FileData[1]);
        if(
ipf>=start && ipf<=end){
            
format(Country,sizeof(Country),"%s(%s)",FileData[6],FileData[5]);
            
fclose(IPFile);
            return 
1;
        }
        
fread(IPFile,Text,sizeof(Text),false);
    }
    
fclose(IPFile);
    return 
1;

Reply


Messages In This Thread
It shows me the wrong information - by nuriel8833 - 05.07.2010, 18:23
Re: It shows me the wrong information - by nuriel8833 - 06.07.2010, 05:03
Re: It shows me the wrong information - by Miikkel - 06.07.2010, 07:17
Re: It shows me the wrong information - by Matthias_ - 06.07.2010, 07:45
Re: It shows me the wrong information - by nuriel8833 - 06.07.2010, 07:56
Re: It shows me the wrong information - by nuriel8833 - 07.07.2010, 08:43
Re: It shows me the wrong information - by dice7 - 07.07.2010, 09:01
Re: It shows me the wrong information - by nuriel8833 - 15.07.2010, 16:06

Forum Jump:


Users browsing this thread: 1 Guest(s)