Kevin1003 Posted March 28, 2016 Share Posted March 28, 2016 Hello to all I have done this script and it works fine.. but I want that closes with the same animation ( of the open) without disappearing suddenly. (I'm using GUI Interpolate Effects ) Thanks. Code: local gRoot = getRootElement() local start = getTickCount() local one, one1 = 5, 5 local two, two1 = 50, 50 function content() local now = getTickCount() local x,y = interpolateBetween(one, one1, 0, two, two1, 0, (now - start) / ((start + 1500) - start), "Linear") dxDrawRectangle(x,y, 480, 750, tocolor(0, 0, 0, 130), false) end function open() opened = not opened if opened == true then start = getTickCount() addEventHandler ( "onClientRender", gRoot, content ) else removeEventHandler( "onClientRender", gRoot, content ) end end bindKey("F2","down",open) 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