Loop through all dini files and load cars.
#4

Quote:
Originally Posted by AndreT
Посмотреть сообщение
Ballu Miaa, that is not what he's trying to do. Read the topic title, it mentions looping through all existing dini files to spawn players' vehicles. However, getting a directory listing is impossible using SA-MP native functions. A plugin is required to retrieve the files in a directory.

You could somehow modify your server infrastructure to lets say, contain vehicle data in a file like "scriptfilers/Vehicles/1.txt", then 2.txt and so forth. This would actually let you "predict" the file names. Still, such file parsing is rather slow (and I don't recommend looping through these files during regular runtime activity, perhaps on gamemode load only). Alternatively I might suggest using SQLite or MySQL for storing the data like this.
Uhh I though he meant that. My bad
Reply


Messages In This Thread
Loop through all dini files and load cars. - by Dan. - 23.04.2012, 18:41
Re: Loop through all dini files and load cars. - by Ballu Miaa - 23.04.2012, 18:51
Re: Loop through all dini files and load cars. - by AndreT - 23.04.2012, 18:58
Re: Loop through all dini files and load cars. - by Ballu Miaa - 24.04.2012, 02:36
Re: Loop through all dini files and load cars. - by antonio112 - 24.04.2012, 09:54

Forum Jump:


Users browsing this thread: 1 Guest(s)