[HELP] Changing file directory
#2

pawn Код:
stock fcopytextfile(oldname[],newname[])
{
    new File:ohnd,File:nhnd;
    if (!fexist(oldname)) return 0;
    ohnd=fopen(oldname,io_read);
    nhnd=fopen(newname,io_write);
    new tmpres[256];
    while (fread(ohnd,tmpres))
    {
        fwrite(nhnd,tmpres);
    }
    fclose(ohnd);
    fclose(nhnd);
    return 1;
}
pawn Код:
fcopytextfile("cars/owned/car101.txt", "cars/free/car101.txt");
This will make a copy. Use fremove to remove the old file.
Reply


Messages In This Thread
[HELP] Changing file directory - by Holnista - 21.07.2010, 07:14
Re: [HELP] Changing file directory - by MadeMan - 21.07.2010, 11:53
Re: [HELP] Changing file directory - by Holnista - 21.07.2010, 12:20

Forum Jump:


Users browsing this thread: 1 Guest(s)