22.12.2010, 22:30
you could create one extra file: "PlayerList.ini".
In this file, every line holds the name of the datafile (account-file) for every player:
Read this PlayerList file line by line and open/read/close the file that was listed on that line.
Then, when you reach the end of the file, you've processed all player's datafiles.
When a new player registers himself to your server, add the filename of his account to this PlayerList.ini file.
You can use the command "dir" (in the windows command prompt) to build this file:
Select "Execute..." from your start menu and enter "cmd".
This opens the command prompt.
Changedir to your server's directory.
Then type:
dir /B >> PlayerList.ini
This lists all files without size-info (only the filenames) and adds them all to the PlayerList.ini file.
In this file, every line holds the name of the datafile (account-file) for every player:
Код:
PowerPC603.ini CrazyGuy.ini Spongebob.ini
Then, when you reach the end of the file, you've processed all player's datafiles.
When a new player registers himself to your server, add the filename of his account to this PlayerList.ini file.
You can use the command "dir" (in the windows command prompt) to build this file:
Select "Execute..." from your start menu and enter "cmd".
This opens the command prompt.
Changedir to your server's directory.
Then type:
dir /B >> PlayerList.ini
This lists all files without size-info (only the filenames) and adds them all to the PlayerList.ini file.