05.11.2016, 21:23
PHP код:
if(!fexist("updates.cfg"))
{
new File:handle = fopen("updates.cfg", io_readwrite);
fclose(handle);
}
else
{
new File:file = fopen("updates.cfg", io_readwrite), idx = 1, string[128];
while(fread(file, string))
{
if(strfind(string, "type:2") != -1)
{
fdeleteline("updates.cfg", idx);
strdel(string, strlen(string) - 8, strlen(string));
strins(string, "type:0", strlen(string), sizeof(string));
fwrite(file, string);
fclose(file);
}
idx++;
}
}