12.02.2010, 06:40
you shouldnt copy the file, just use the function:
frename(oldname[], newname[]);
thats it
if you dont have frename use this:
frename(oldname[], newname[]);
thats it
if you dont have frename use this:
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;
}