joedajoester Posted November 22, 2011 Share Posted November 22, 2011 Hi, i am using a gate script and need to add easing and need help with it. https://wiki.multitheftauto.com/wiki/Easing edit*anyone? no one knows how to use this? col = createColTube ( 2919.8000488281, -790.9, 10.300000190735, 15, 15) -- enter your cooderates here for your colshape please note 10 and 3 is to do with the size of the shape. root = getRootElement () lift = createObject ( 968, 2919.8000488281, -790.9, 11.300000190735, 0, -90, 88) -- enter the ID of the object followed by the coordinates -- note the rotx y and z may not be required so you just remove these. x y and z is where you would put your cordinates. function Open ( pla ) if getElementType ( pla ) == "player" then --here you can alter the group from Admin to whatever you require in your server but remember the rest must be the same i.e change everything where it says Admin to your desired group and add the users to that group. if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then moveObject (lift, 1800, 2919.8000488281, -791, 11.300000190735, 0, 90, 0) -- here is where you enter the coordinatess of the new location of the object, 2500 = the speed of the movent. end end end addEventHandler ( "onColShapeHit", col, Open) addEventHandler ( "Open", root, Open) function Close ( pla ) if getElementType ( pla ) == "player" then if vehicle or not vehicle then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then moveObject (lift, 3500, 2919.8000488281, -790.9, 11.300000190735, 0, -90, 0) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. else return 0 end end end end addEventHandler ( "onColShapeLeave", col, Close ) addEventHandler ( "Close", root, Close) Link to comment
Aibo Posted November 23, 2011 Share Posted November 23, 2011 you can just specify easing type string in moveObject function: moveObject (lift, 3500, 2919.8000488281, -790.9, 11.300000190735, 0, -90, 0, "InQuad") for type names see the Easing wiki page you've linked Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now