Thread: [Solved] Contain in .ini dont work
View Single Post
Author Message
The overrated maniac
Member
Join Date: Jun 2021
Location: Argentina
Old 07-29-2021 , 11:55   Contain in .ini dont work
Reply With Quote #1

I have this and when I enter the game and test it says that the .ini file contains the user ip.. and it dosn't, it only contain "asd123 sada1231221 sdsd123".

Also when I put in the file
asd123
asd4321

and print it only says the first line, why?

PHP Code:
                new Path[256];
        
get_configsdir(Pathcharsmax(Path));
        
formatex(Pathcharsmax(Path),"%s/%s"PathgFileName);
    
        if(!
file_exists(Path)){
            return 
PLUGIN_HANDLED;
        }
    
        new 
fopen(Path"rt");
    
        new 
szFileData[160];
    
        while(!
feof(f)){
        
            
fgets(fszFileData50000);
            
trim(szFileData);
            
            if(
contain(szFileDatag_szUserIP)){
                
chatcolor(0"CONTAIN IP");
                return 
PLUGIN_HANDLED;
            }
            else{
                
chatcolor(0"NO CONTAIN");
                return 
PLUGIN_HANDLED;
            }
        }
        
fclose(f); 

Last edited by The overrated maniac; 07-29-2021 at 15:41. Reason: Solved
The overrated maniac is offline