29.10.2010, 14:25
Got this:
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.
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;
}
}