pd = CreateDynamicObject(968,1544.69921875,-1623.89941406,13.19999981,0.40100098,90.00000000,270.81848145); //object(barrierturn)(2)
else if(PlayerToPoint(10, playerid,1543.3916,-1627.9576,13.3828) || PlayerToPoint(10, playerid,1549.4288,-1628.2776,13.3828))
{
MoveDynamicObject(pd, 1544.69921875,-1623.89941406,13.19999981, 3.0);
SetTimer("pdclose",5000, false);
return 1;
}
}
public pdclose()
{
MoveDynamicObject(pd, 1544.69921875,-1623.89941406,13.19999981, 3.0);
return 1;
}
else if(PlayerToPoint(10, playerid,1543.3916,-1627.9576,13.3828) || PlayerToPoint(10, playerid,1549.4288,-1628.2776,13.3828))
{
MoveDynamicObject(pd, 1544.69921875,-1623.89941406,18.19999981, 3.0); //18.199 instead of 13.199 will move the gate 5 up.
SetTimer("pdclose",5000, false);
return 1;
}
}
Well, how should it move up if all your Z Var's are 13.19999.
You have to change the MoveDynamicObject in your command to the position where you want it to move to, for example: pawn Код:
|
Open:
MoveDynamicObject(pd, 1544.69921875,-1623.89941406,13.21999981,3.0,0.40100098,90.00000000,360.0);
Close:
MoveDynamicObject(pd, 1544.69921875,-1623.89941406,13.20999981,3.0,0.40100098,90.00000000,270.818);