Why will this not work.
#2

You try to redefine i which has previously been defined, not sure why it isn't throwing an error in your compiler.
Try using a different variable.

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                // Gate3 (Cage) U
                if(IsPlayerInRangeOfPoint(i, 5.0, -423.6993, 2201.7231, 40.9262) && OpenGateCage[i] == false) // Close --> Open
                {
                    OpenGateCage[i] = true;
                    MoveDynamicObject(Gate3, -423.692413, 2201.705811, 50.923096, 10.0);
                    MoveDynamicObject(Gate4, -423.686127, 2206.743164, 45.926369, 10.0);
                    MoveDynamicObject(Gate5, -418.655365, 2201.730713, 45.926369, 10.0);
                    MoveDynamicObject(Gate6, -423.685608, 2196.700928, 45.913692, 10.0);
                    MoveDynamicObject(Gate7, -428.733124, 2201.718506, 45.926338, 10.0);
                }
                else if(!IsPlayerInRangeOfPoint(i, 5.0, -423.699341, 2201.723145, 40.926292) && OpenGateCage[i] == true) // Open --> Close
                {
                    OpenGateCage[i] = false;
                    MoveDynamicObject(Gate3, -423.692413, 2201.705811, 59.923141, 1.5);
                    MoveDynamicObject(Gate4, -423.686127, 2215.716309, 45.926369, 1.5);
                    MoveDynamicObject(Gate5, -409.680603, 2201.730713, 45.926369, 1.5);
                    MoveDynamicObject(Gate6, -423.685608, 2187.702881, 45.913692, 1.5);
                    MoveDynamicObject(Gate7, -437.683075, 2201.718506, 45.926338, 1.5);
                }
                Second = 0;
            }
        }
...
for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(IsPlayerInRangeOfPoint(i, 80.0, -3362.7395,-75.1055,14.1891) && ISADMIN[i] == false)
                    {
                        new Float:X, Float:Y, Float:Z;
                        GetPlayerPos(i,X,Y,Z);
                        CreateExplosion(X, Y , Z, 7, 10.0);
                    }
                    Second5 = 0;
                }
            }
Reply


Messages In This Thread
Why will this not work. - by BP13 - 11.01.2010, 00:49
Re: Why will this not work. - by mansonh - 11.01.2010, 04:47
Re: Why will this not work. - by Joe Staff - 11.01.2010, 05:28

Forum Jump:


Users browsing this thread: 1 Guest(s)