10.03.2013, 18:08
Quote:
Creating a separate file for each vehicle is going to be very inefficient. For example, if he were to load a player's vehicles upon connections, he would need to loop through each file and see if one belongs to the player. That requires opening each file, reading data from the file, checking that data, and closing the file every time.
My suggestion was to create another file with the player's name. That way, when the player connects, it searches for a file with that user's name, and if it exists, loads the vehicles he owns from that file. It prevents from looping through the files, opening, closing, and reading data from those files as well. |
![Smiley](images/smilies/smile.png)