07.11.2009, 16:17
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:
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;
}