changename cmd y_ini system problem
#1

I Want to make a cmd with zcmd to change players name
and i want it to move all players data to a new file ...
i want that to save money , score and ... in new profile
actually i want to know how can i do something to change a y_ini file Name ! ( User Profile )
Reply
#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


Forum Jump:


Users browsing this thread: 2 Guest(s)