[Object Rotation]Simple but I don't know.
#7

Quote:
Originally Posted by [SU
BP13 ]
that is not working, The object does not move. yet it compiles. if it makes any difference I combined this with a existing timer so i don't need extra:


This is used in a 2000ms timer:


pawn Код:
public CheckGate()
{
    new Float:angle;
    SetDynamicObjectRot(SQUARE, 0, 0, angle);
    angle++;
    if(angle >= 360) angle = 0;
       
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        // Gate3 (Cage) U
        if(PlayerToPoint(5.0, i,-423.699341, 2201.723145, 40.926292)&& 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(!PlayerToPoint(5.0, i,-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);
        }
    }
    return 1;
}
As you can see in my example I don't put new Float:angle; inside the function, but outside of it.
Reply


Messages In This Thread
[Object Rotation]Simple but I don't know. - by BP13 - 07.11.2009, 02:54
Re: [Object Rotation]Simple but I don't know. - by Daren_Jacobson - 07.11.2009, 03:20
Re: [Object Rotation]Simple but I don't know. - by BP13 - 07.11.2009, 03:52
Re: [Object Rotation]Simple but I don't know. - by BP13 - 07.11.2009, 13:47
Re: [Object Rotation]Simple but I don't know. - by MadeMan - 07.11.2009, 15:51
Re: [Object Rotation]Simple but I don't know. - by BP13 - 07.11.2009, 16:17
Re: [Object Rotation]Simple but I don't know. - by MadeMan - 07.11.2009, 17:00
Re: [Object Rotation]Simple but I don't know. - by BP13 - 07.11.2009, 18:09
Re: [Object Rotation]Simple but I don't know. - by MadeMan - 07.11.2009, 18:11
Re: [Object Rotation]Simple but I don't know. - by BP13 - 07.11.2009, 23:01

Forum Jump:


Users browsing this thread: 3 Guest(s)