A little assistance
#5

Can't you just make some functions like LoadMap(mapid) and UnloadMap(mapid) that create the pickups/objects. And set a global var that stores the current mapid. Then under your callbacks check which is the current map, and go from there.

Eg,

pawn Код:
#define RACE_MAP_LS             (1)
#define DM_MAP_LV               (2)

new g_iCurrentMapID = 0;

stock LoadMap(mapid)
{
    switch(mapid)
    {
        case RACE_MAP_LS:
        {
            g_iCurrentMapID = RACE_MAP_LS;
            //load objects pickups for this map
        }
       
        case DM_MAP_LV:
        {
            g_iCurrentMapID = DM_MAP_LV;
            //load objects pickups for this map
        }
    }
}

stock UnloadMap(mapid)
{
    switch(mapid)
    {
        case RACE_MAP_LS:
        {
            g_iCurrentMapID = 0;
            //unload objects pickups for this map
        }
        //...
    }
}

public OnPlayerSpawn(playerid)
{
    switch(g_iCurrentMapID)
    {
        case RACE_MAP_LS:
        {
            //set spawn in this map
        }
        //...
    }
    return 1;
}
Reply


Messages In This Thread
A little assistance - by Gangs_Rocks - 10.07.2012, 08:51
Re: A little assistance - by Gangs_Rocks - 10.07.2012, 10:50
Re: A little assistance - by Gangs_Rocks - 10.07.2012, 12:08
Re: A little assistance - by Gangs_Rocks - 11.07.2012, 09:28
Re: A little assistance - by iggy1 - 11.07.2012, 10:03
Re: A little assistance - by [MM]RoXoR[FS] - 11.07.2012, 10:47

Forum Jump:


Users browsing this thread: 1 Guest(s)