What am I doing wrong :O?
#1

Got this:

pawn Код:
forward MoveLift();
public MoveLift()
{
    if(IsUp == 1)
    {
        for( new i = 0; i < sizeof(lift); i ++ )
        {
            new Float:x,Float:y,Float:z;
            GetDynamicObjectPos(i,x,y,z);
            MoveDynamicObject(i, x,y, z-37, 2);
        }

        IsUp = 0;
    }
    else if(IsUp == 0)
    {
        for( new i = 0; i < sizeof(lift); i ++ )
        {
           new Float:x,Float:y,Float:z;
           GetDynamicObjectPos(lift[i],x,y,z);
           MoveDynamicObject(lift[i], x,y, z+37, 2);
       }

        IsUp = 1;
    }
}
Problem is, it's going always +37, and not -37. So the lift is going up all the time, and not going down. I want that one time it goes down, other time up.
Reply


Messages In This Thread
What am I doing wrong :O? - by rbN. - 29.10.2010, 14:25
Re: What am I doing wrong :O? - by iggy1 - 29.10.2010, 14:31
Re: What am I doing wrong :O? - by rbN. - 29.10.2010, 14:38
Re: What am I doing wrong :O? - by iggy1 - 29.10.2010, 14:40
Re: What am I doing wrong :O? - by rbN. - 29.10.2010, 14:45
Re: What am I doing wrong :O? - by iggy1 - 29.10.2010, 14:49
Re: What am I doing wrong :O? - by rbN. - 29.10.2010, 15:23

Forum Jump:


Users browsing this thread: 1 Guest(s)