09.08.2018, 22:05
Hi guys
I have .txt file with skins,for example:
I want to make that I can add/delete skins IG!Adding skin is simple,but problem is remove line.
I'm try with this function:
Problem is when I use this:
fdeleteline("skins.txt","0");
So I want that he delete 0 skin,he will delete 10,20,50 ...I don't know how to fix this..
I have .txt file with skins,for example:
Код:
0 1 2 3 4 10 15 20 50 128
I'm try with this function:
Код:
fdeleteline(filename[], removed[]) { new string[64], str[32], File:handle, File:ftmp; handle = fopen(filename,io_read); format(str,sizeof(str),"%s.part",filename); ftmp = fopen(str,io_write); while(fread(handle,string)) if(strfind(string,removed) == -1) fwrite(ftmp,string); fclose(handle); fclose(ftmp); handle = fopen(filename,io_write); ftmp = fopen(str,io_read); while(fread(ftmp,string)) fwrite(handle,string); fclose(handle); fclose(ftmp); return fremove(str); }
fdeleteline("skins.txt","0");
So I want that he delete 0 skin,he will delete 10,20,50 ...I don't know how to fix this..