SA-MP Forums Archive
[PLEASE HELP] Question regarding file system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [PLEASE HELP] Question regarding file system (/showthread.php?tid=149068)



[PLEASE HELP] Question regarding file system - LTomi - 20.05.2010

Hi again,
Now I'd like to create a vehicle ownership system for my gamemode where every single vehicle has an own configuration file. If somebody buys a vehicle, a new file will be created and named after the player. When the gamemode starts, every car configuration file should be loaded and the cars should be spawned, but I don't know how to do this. Is there any way to load every single file from a directory? Any ideas are welcome.


Re: [PLEASE HELP] Question regarding file system - DJDhan - 20.05.2010

Well considering the number of replies, I'd say you should download some vehicle ownership scripts to see how things work
Trust me, that would help a lot.


Re: [PLEASE HELP] Question regarding file system - Nero_3D - 20.05.2010

And to your question, no you cant read all files in a directory
The best solution is, create a file with all names and vehicles
for example: vehicleid = name => 342 = LTomi


Re: [PLEASE HELP] Question regarding file system - LTomi - 20.05.2010

Quote:
Originally Posted by ♣ Joker ♠
And to your question, no you cant read all files in a directory
The best solution is, create a file with all names and vehicles
for example: vehicleid = name => 342 = LTomi
I have the same system now, but it is bugged sometimes.
Anyways, thanks for help guys.