Loading maps
#15

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");
Reply


Messages In This Thread
Loading maps - by dominik523 - 11.10.2014, 12:44
Re: Loading maps - by Rudy_ - 11.10.2014, 12:53
Re: Loading maps - by dominik523 - 11.10.2014, 12:55
Re: Loading maps - by Stinged - 11.10.2014, 12:57
Re: Loading maps - by Rudy_ - 11.10.2014, 13:02
Re: Loading maps - by dominik523 - 11.10.2014, 13:05
Re: Loading maps - by highstreetsrp - 11.10.2014, 13:08
Re: Loading maps - by Rudy_ - 11.10.2014, 13:08
Re: Loading maps - by Pottus - 11.10.2014, 13:30
Re: Loading maps - by dominik523 - 11.10.2014, 13:37
Re: Loading maps - by Pottus - 11.10.2014, 13:40
Re: Loading maps - by fonia5 - 11.10.2014, 13:42
Re: Loading maps - by Pottus - 11.10.2014, 13:46
Re: Loading maps - by dominik523 - 11.10.2014, 13:52
Re: Loading maps - by Pottus - 11.10.2014, 13:53
Re: Loading maps - by dominik523 - 11.10.2014, 14:21
Re: Loading maps - by Rudy_ - 12.10.2014, 08:12
Re: Loading maps - by dominik523 - 12.10.2014, 08:23
Re: Loading maps - by Rudy_ - 12.10.2014, 08:24

Forum Jump:


Users browsing this thread: 2 Guest(s)