HELP! Scripting problem
#1

I've got a weird problem. I've got a ticket script, that when either team's tickets reaches 0, the map changes (as you can see below). But I've also set world boundaries per map. However, they all work currently (the boundaries) except for the last one here, "The Canal." everytime the map switches to the map called "The Canal" is says "Stay within the world boundaries." But why? I've been calculating the correct world boundaries for that map several times, and it still doesn't work. What am I doing wrong?

pawn Код:
public Nextmap()
{
   if(Map == 1)
   {
       Map = 2;
       alticket = 70;
       axticket = 70;
       SendRconCommand("mapname Damavand Peak");
       SendClientMessageToAll(c_green, "** Next map has been loaded! (Damavand Peak)");
       for(new i=0; i<MAX_PLAYERS; i++) {
        if(PlayerInfo[i][class] == 3) { PlayerInfo[i][class] = 1; }
        PlayerInfo[i][spawn] = 0;
        SetPlayerHealth(i, 0.0);
        SetPlayerWorldBounds(i, -1646.58, -2499.065, -1483.09, -2113.696);
        bzone1C = 0;
        bzone2C = 0;
        Changing = 0;
        UpdateZones();
        UpdateZonesForPlayer(i); }
   }
   else if(Map == 2)
   {
       Map = 3;
       alticket = 70;
       axticket = 70;
       SendRconCommand("mapname Noshahr Canals");
       SendClientMessageToAll(c_green, "** Next map has been loaded! (Noshahr Canals)");
       for(new i=0; i<MAX_PLAYERS; i++) {
       if(PlayerInfo[i][class] == 4) { PlayerInfo[i][class] = 1; }
       PlayerInfo[i][spawn] = 0;
       SetPlayerHealth(i, 0.0);
       SetPlayerWorldBounds(i, 4274.103, 2160.407, 1436.379, -688.9946);
       czone1C = 0;
       Changing = 0;
       UpdateZones();
       UpdateZonesForPlayer(i); }
   }
   else if(Map == 3)
   {
       Map = 4;
       alticket = 70;
       axticket = 70;
       SendRconCommand("mapname The Canal, by Jackob");
       SendClientMessageToAll(c_green, "** Next map has been loaded! (The Canal, by Jackob)");
       for(new i=0; i<MAX_PLAYERS; i++) {
       PlayerInfo[i][spawn] = 0;
       SetPlayerHealth(i, 0.0);
       SetPlayerWorldBounds(i, -6257.099121, -2310.443115, -5633.099121, -1910.443115);
       dzone1C = 0;
       dzone2C = 0;
       Changing = 0;
       UpdateZones();
       UpdateZonesForPlayer(i); }
   }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)