SA-MP Forums Archive
Map/Object Loading Help (.ini/.txt) files - 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)
+--- Thread: Map/Object Loading Help (.ini/.txt) files (/showthread.php?tid=583192)



Map/Object Loading Help (.ini/.txt) files - Toxik - 26.07.2015

Sup guys i really need help
i got so many maps on my Server in .ini file and .txt file
how can i make the gamemode load them all at once ?

This is the folder where my maps are Stored

scriptfiles/Maps

i need the codes for load the map and a Little Explain how to

i got the files in
CreateObject FORMAT
scriptfiles/Maps/DM1.ini

scriptfiles/Maps/DM1.txt

I hope you can help me


Re: Map/Object Loading Help (.ini/.txt) files - TwinkiDaBoss - 26.07.2015

I preety much dont recommend you this. Personally I had issues with this system as it comes to large scale maps

Instead make a separate .pwn and save it somewhere
Example make a folder Maps in gamemodes folder and do this
pawn Код:
#include "..\gamemodes\Maps\MyFirstMap.pwn

And this is your .pwn file
pawn Код:
#include <a_samp>
#include <streamer> //if you are using CreateDynamicObject

CreateObjectsForServer()
{
    //Your CreateObjects here
    return 1;
}


And now just add CreateObjectForServer() under OnGameModeInit



EDIT: You can do the same thing with making an include with all maps but personally just go with a separate pawn if you want of it to be more efficiant and to have the code look nice


Re: Map/Object Loading Help (.ini/.txt) files - Toxik - 26.07.2015

well i will try


Re: Map/Object Loading Help (.ini/.txt) files - Toxik - 27.07.2015

Error
pawn Код:
C:\Users\CraTzy\Desktop\LVDM\gamemodes\LVDM.pwn(3) : fatal error 100: cannot read from file: "..\scripfiles\Maps\DM1.pwn"

Line
pawn Код:
#include "..\scripfiles\Maps\DM1.pwn"
i got the folder Maps in scriptfiles and DM1.pwn


Re: Map/Object Loading Help (.ini/.txt) files - SoFahim - 27.07.2015

Use need to put that DM1.pwn in the main gamemode.pwn folder , and locate is as it there


Re: Map/Object Loading Help (.ini/.txt) files - Toxik - 27.07.2015

explain better dude i cant get how to configure it


Re: Map/Object Loading Help (.ini/.txt) files - SoFahim - 27.07.2015

You want this dm1.pwn as FS or in Gamemode ?