Here is what you have to look at.
static maps - These maps are ALWAYS loaded and belong in the gamemode
dynamic maps - These maps load unload as required and belong in a filterscript
Get it ?
In the case of static maps all you need to do is create include files in fact they are almost identical to a filterscript with a few differences.
Example I'm using y_hooks here but you can use als method 7 if you want I just like this way since it simplifies the code.
pawn Код:
#include <YSI\y_hooks>
hook OnGameModeInit()
{
CreateDynamicObject(970, -2000.89941, 122.29980, 27.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(970, -2000.89941, 128.00000, 27.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(970, -2000.89941, 133.89941, 27.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(970, -2000.89941, 139.89941, 27.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(970, -2000.89941, 145.39941, 27.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(970, -2000.89941, 151.09961, 27.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(970, -2000.89941, 157.00000, 27.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(970, -2000.89941, 162.59961, 27.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(970, -2000.89941, 168.19922, 27.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(970, -2000.89941, 174.00000, 27.20000, 0.00000, 0.00000, 90.00000);
CreateDynamicObject(970, -1995.50000, 122.29980, 27.20000, 0.00000, 0.00000, 90.00000);
CreateVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 60)
}
Then it's just a matter of stacking these include files in your gamemode.
Example.
pawn Код:
#include "maps\map1.pwn"
#include "maps\map2.pwn"
#include "maps\map3.pwn"
#include "maps\map4.pwn"
#include "maps\map5.pwn"
#include "maps\map6.pwn"
If your loading filterscripts you need to do this.
pawn Код:
SendRconCommand("loadfs map1");
SendRconCommand("unloadfs map1");