Raised This Month: $51 Target: $400
 12% 

Solved Contain in .ini dont work


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode