Multiple vehicles
#6

Quote:
Originally Posted by Bakr
Посмотреть сообщение
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.
I see, thank you for making this clear.
Reply


Messages In This Thread
Multiple vehicles - by edzis84 - 10.03.2013, 17:55
Re: Multiple vehicles - by Bakr - 10.03.2013, 17:58
Re: Multiple vehicles - by Denying - 10.03.2013, 17:59
Re: Multiple vehicles - by Denying - 10.03.2013, 18:01
Re: Multiple vehicles - by Bakr - 10.03.2013, 18:04
Re: Multiple vehicles - by Denying - 10.03.2013, 18:08
Re: Multiple vehicles - by edzis84 - 10.03.2013, 18:27
Re: Multiple vehicles - by Bakr - 10.03.2013, 20:14

Forum Jump:


Users browsing this thread: 1 Guest(s)