Map/Object Loading Help (.ini/.txt) files
#1

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
Reply
#2

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
Reply
#3

well i will try
Reply
#4

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
Reply
#5

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

explain better dude i cant get how to configure it
Reply
#7

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


Forum Jump:


Users browsing this thread: 1 Guest(s)