View Full Version : changename cmd y_ini system problem

20/04/2014, 11:43 AM
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 )

20/04/2014, 11:46 AM
I use this in my script, I found this in another script (I don't remember the name):

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);
return 1;

It will remove the previous file and copy the content to a new one.