Need help loading buyable vehicles
#2

Well it depends on how you read those .txt files. Are you using something like dini or Y_ini?

If you're using native file functions, my suggestion would be to count and store the number of lines read and on second and later entries skipping until those lines. Although, if someone changes the file between reads, this will cause a problem.

Anoter approach, would be to store the last car loaded. Then reading the file again, skipping the lines until you find one which wasn't loaded.

Anyhow, I would advise you to load all vehicles on server startup. If you want to be able to add cars while server is running, you should add a command which reloads them but ofcourse you would limit the amount of vehicles that can be bought.
Reply


Messages In This Thread
Need help loading buyable vehicles - by NRG2 - 19.09.2014, 13:31
Re: Need help loading buyable vehicles - by dusk - 19.09.2014, 16:32
Re: Need help loading buyable vehicles - by NRG2 - 19.09.2014, 22:16
Re: Need help loading buyable vehicles - by TakeiT - 19.09.2014, 22:29
Re: Need help loading buyable vehicles - by NRG2 - 19.09.2014, 23:48

Forum Jump:


Users browsing this thread: 1 Guest(s)