26.07.2015, 19:17
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
And this is your .pwn file
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
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

