change time
#1

hi,
after some time my maps are changing and i want to define a different time for each map.
How can i do this?
This is how i change the maps:
pawn Код:
new CurrentMode;

//AngleHighs/////////////////////////////////////////////////////////////////////////////////
new Float:ModeOneSpawnsPolice[6][5] = //map1 team1
{
    {609.7040,-586.5684,17.2266,256.8267},
    {610.3588,-590.8182,17.2266,263.0453},
    {616.1186,-591.2390,17.2330,268.1367},
    {619.4320,-586.6706,17.2330,261.1437},
    {614.9709,-610.6100,17.2266,355.6629},
    {610.4255,-607.5670,17.2266,330.0057}

};

new Float:ModeOneSpawnsBurner[6][5] = //map1 team2
{
    {804.0115,-612.1152,16.3432,47.2465},
    {812.3744,-612.2579,16.3359,40.3489},
    {824.7153,-612.1229,16.3359,23.1518},
    {834.3637,-602.8866,16.3359,45.8388},
    {811.1272,-608.6595,16.3359,52.8724},
    {781.4649,-620.4591,16.3359,355.2838}

};
//ForestCombat//////////////////////////////////////////////////////////////////////////////////////////
new Float:ModeTwoSpawnsPolice[6][5] = //map2 team1
{
    {1129.3441,-3488.2317,41.6368,185.1953},
    {1128.4489,-3481.5713,41.8567,185.4580},
    {1147.0452,-3471.7043,41.8558,275.8918},
    {1156.9124,-3477.0078,42.9051,207.2975},
    {1143.7147,-3493.4993,42.6860,129.8609},
    {1122.1593,-3501.5063,41.6362,132.0289}

};

new Float:ModeTwoSpawnsBurner[6][5] = //map2 team2
{
    {955.0472,-3645.6208,29.6458,122.5858},
    {943.0879,-3645.9138,29.6452,82.2629},
    {931.4894,-3637.9790,29.1816,11.5298},
    {946.4507,-3618.7424,28.9370,22.8071},
    {922.2674,-3642.7981,28.5708,356.7147},
    {961.4850,-3636.1028,29.4755,11.6762}

};

new Map[2][20]=
{
    {"map1"},
    {"map2"}
   
};

//OnPlayerSpawn
    if(CurrentMode == 0)//map1
    {
          switch (gTeam[playerid])
    {
        case 1: //team1
        {
        new Spawn = random(sizeof(ModeOneSpawnsPolice));
        SetPlayerPos(playerid,ModeOneSpawnsPolice[Spawn][0],ModeOneSpawnsPolice[Spawn][1],ModeOneSpawnsPolice[Spawn][2]);
        SetPlayerFacingAngle(playerid,ModeOneSpawnsPolice[Spawn][4]);
        SendClientMessage(playerid,0x999900AA, "Welcome to the battle territory * Angle Highs *");
       

        }

        case 2: //team2
        {
        new Spawn = random(sizeof(ModeOneSpawnsBurner));
        SetPlayerPos(playerid,ModeOneSpawnsBurner[Spawn][0],ModeOneSpawnsBurner[Spawn][1],ModeOneSpawnsBurner[Spawn][2]);
        SetPlayerFacingAngle(playerid,ModeOneSpawnsBurner[Spawn][4]);
        SendClientMessage(playerid,0x999900AA, "Welcome to the battle territory * Angle Highs *");
       
        }
    }
   

    }

//if i do this, only the first time (16) is used in every map, but it doesnt chage to 0 .


//OnGameModeInit
{
        switch (CurrentMode)
    {
        case 0: //map1
        {
        SetWorldTime(16);
        }
        case 1: //map2
        {
        SetWorldTime(0);
        }
    }


}
i hope u can give me a hint

regards
Reply
#2

SetPlayerTime ? when the player enters the map..(if you don't know how to check when he enter use areas... from Incogito streamer or something)..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)