changename cmd y_ini system problem
#2

I use this in my script, I found this in another script (I don't remember the name):
pawn Код:
stock frename(oldname[], newname[])
{
    if (!fexist(oldname)) return 0;
    new File:oldfile = fopen(oldname, io_read);
    new File:newfile = fopen(newname, io_write);
    new line[256];
    while (fread(oldfile, line))
    {
        fwrite(newfile, line);
    }
    fclose(oldfile);
    fclose(newfile);
    fremove(oldname);
    return 1;
}
It will remove the previous file and copy the content to a new one.
Reply


Messages In This Thread
changename cmd y_ini system problem - by lonalovegood1 - 20.04.2014, 11:43
Re: changename cmd y_ini system problem - by SyntaxQ - 20.04.2014, 11:46

Forum Jump:


Users browsing this thread: 1 Guest(s)