[Tutorial] Using the Dynamic Map System Filterscript
#1

Dynamically loading maps using the Dynamic Map System filterscript
In short the system allows you to reduce the size of your filterscript and keep your mapping more organized(and dynamically alterable). This tutorial shows you how to use the filterscript and import your mapping into the database.

Let's say we have a small map(this isn't a real map just some random lines I created for the tutorial):

pawn Code:
CreateObject(19302, 0.0, 0.0, 0.0, 5.0, 7.5, 0.3);
CreateObject(19303, 0.5, 0.889, 0.33, 9.3, 5.0, 0.3);
CreateObject(1495, 105.0, 5.5, 3.3, 309.3, 7.5, 0.95465);
We want to import this into the database. The first thing we need to do is (if not already) download the github repository and open the filterscripts folder.




Then we need to open the "import.pwn" file(inside the filterscript directory). It should look something like this:



Then simply paste your code into the OnFilterScriptInit callback:

Hit "CTRL+H" to open the "Find & Replace" dialog, which should look something like:


For the search box either type CreateDynamicObject or CreateObject depending on the type of objects your code is using.

Then in the replace simply type "ImportObject". Our code should now look something like:


Next simply compile the script. Then, we need to download the SA-MP server package. You can find it at sa-mp.com/download. After that, you'll need to copy the filterscript + scriptfiles folders into the SA-MP server package.

(You'll need to download the streamer plugin if you intend on running the streamer version of maps.pwn - maps_streamer.pwn).

Open the server and run the "import.amx" filterscript. The objects should import into the database(objects.db). After this is done and the "import filterscript has been loaded" message pops up you can simply load the maps filterscript and the maps should be in-game.

You can find the filterscript here: https://sampforum.blast.hk/showthread.php?tid=583179

If I missed anything or anything is unclear feel free to reply with your feedback.
Reply


Messages In This Thread
Using the Dynamic Map System Filterscript - by Abagail - 26.07.2015, 16:45
Re: Using the Dynamic Map System Filterscript - by SoFahim - 26.07.2015, 18:38
Re: Using the Dynamic Map System Filterscript - by Abagail - 26.07.2015, 19:06
Re : Using the Dynamic Map System Filterscript - by KillerDVX - 26.07.2015, 21:44

Forum Jump:


Users browsing this thread: 1 Guest(s)