12.08.2012, 14:40
Here's the deal. My server has over 200 maps, resulting in about 100K of lines of code. What we used to do is the following:
1) Cram everything in 1 filterscript we named "maps", this didn't seem like a very good solution to me
2) Organise everything by category: stunt, dmzones, races, drifts, etc... This was a good idea but still required lots of work to add a new map. We had to edit the include files to add the actual map, add a teleport and add a menu item in the game mode.
My idea would be to store all the maps in a folder "maps", in the root directory. Then use the FileManager plugin to read data from the file and so generate all the objects. This way adding a map doesn't require the server to restart and doesn't require anything to be recompiled. The same thing can be done for teleports: store the coordinates in a file and make a function that reads data from that file to generate those teleports.
This, though, may not be the best idea. So I'm asking you, the much more experienced SA-MP community: what would be the best solution to store maps?
1) Cram everything in 1 filterscript we named "maps", this didn't seem like a very good solution to me
2) Organise everything by category: stunt, dmzones, races, drifts, etc... This was a good idea but still required lots of work to add a new map. We had to edit the include files to add the actual map, add a teleport and add a menu item in the game mode.
My idea would be to store all the maps in a folder "maps", in the root directory. Then use the FileManager plugin to read data from the file and so generate all the objects. This way adding a map doesn't require the server to restart and doesn't require anything to be recompiled. The same thing can be done for teleports: store the coordinates in a file and make a function that reads data from that file to generate those teleports.
This, though, may not be the best idea. So I'm asking you, the much more experienced SA-MP community: what would be the best solution to store maps?