Replace what's written in the file
#1

Hi guys...

I got an file called BanIP.txt and it have some banned IPs and my ban system have a time, how can i make the file and edit SOME OF whats written in it? I want how to edit what's written in it not to add....

pawn Код:
new File:gFile2 = fopen("BanIP.txt", io_append);
                if(gFile2)
                {
                    new string2[50];
                    while(fread(gFile2, string2))
                    {
                        if(strcmp(string2, SInfo[playerid][pIP], true) != -1)
                        {
                            fdeleteline("BanIP.txt", string2);
                            fwrite(gFile2, string2);
                        }
                    }
                }
That's is in when the ban time expire function, how to replace the written IP with for example 'BAN Expired' for ex...

anyway pls?

Sorry for my eng
Or deleted the line
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)