Jump to content

Artenos

Members
  • Posts

    20
  • Joined

  • Last visited

Details

  • Gang
    Grove4Laife

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Artenos's Achievements

Civilian

Civilian (7/54)

0

Reputation

  1. I'm doing the animations like you showed me in one of my other posts: local start = getTickCount() local one, one1 = 0, 0 ---- The coordinates of the beginning local two, two1 = 319, 109 ---- The coordinates of the end addEventHandler("onClientRender", root, function() local now = getTickCount() local x,y = interpolateBetween(one, one1, 0, two, two1, 0, (now - start) / ((start + 1500) - start), "Linear") dxDrawRectangle(x,y, 680, 750, tocolor(0, 0, 0, 130), false) end) something simple
  2. I think I would try to use this...somehow
  3. Didn't you read my other comment?
  4. The whole code is at the very top.
  5. it works but it's not doing the animations
  6. Hey guys so I'm trying to create a window made out of dx drawings, I want to be able to use the same bind to open it and close it, But I also want it to be animated when it opens and closes. So far its not working. This is what I got so far: Client local screenW, screenH = guiGetScreenSize() local start = getTickCount() ---Variables----- local one, one1 = screenW * 1.0000, screenH * 0.0000 ---- The coordinates of the beginning local two, two1 = screenW * 0.8477, screenH * 0.0000 ---- The coordinates of the end -------------------------------------- ----DxDrawings and Animations----- function PanelOpen() local width, height = screenW * 0.1523, screenH * 1.0000 ---- The size of the dx rectangle local now = getTickCount() local x,y = interpolateBetween(one, one1, 0, two, two1, 0, (now - start) / ((start + 1000) - start), "OutBounce") dxDrawRectangle(x,y, width, height, tocolor(0, 0, 0, 164), false) end function PanelClose() local width, height = screenW * 0.1523, screenH * 1.0000 ---- The size of the dx rectangle local now = getTickCount() local x,y = interpolateBetween(two, two1, 0, one, one1, 0, (now - start) / ((start + 1000) - start), "Linear") dxDrawRectangle(x,y, width, height, tocolor(0, 0, 0, 164), false) end ------------------------------ -------Render of the drawings------------- function RenderPanel() addEventHandler("onClientRender", root, PanelOpen) end function RenderPanel2() addEventHandler("onClientRender", root, PanelClose) end ------------------------------------------ ---------Binds----------- bindKey("U", "down", RenderPanel) bindKey("U", "up", RenderPanel2)
  7. doesn't that only work with images?
  8. easy : # local start = getTickCount() local one, one1 = 0, 0 ---- The coordinates of the beginning local two, two1 = 319, 109 ---- The coordinates of the end addEventHandler("onClientRender", root, function() local now = getTickCount() local x,y = interpolateBetween(one, one1, 0, two, two1, 0, (now - start) / ((start + 1500) - start), "Linear") dxDrawRectangle(x,y, 680, 750, tocolor(0, 0, 0, 130), false) end) I get it now the x,y and the width and height can be manipulated by the interpolate effect, easy enough. Thanks dude!.
  9. Thank you for the help guys How would I do it so that it slides instead like this:
  10. Hello, so I'm using PaiN^'s [GIE] GUI Interpolate Effects resource (https://forum.multitheftauto.com/viewtopic.php?f=108&t=64608/viewtopic.php?f=108&t=64608) to add animations to my dxrectangle but everytime I run the script it outputs "Not GUI Element" does this mean it doesn't work with dx? if so is there any other way to give simple animations to dx elements? this is the code local screenW, screenH = guiGetScreenSize() ------start---------------- startX = screenW * 0.6486 startY = screenH * 0.4583 startW = screenW * 0.1208 startH = screenH * 0.3151 -----end------------------- endX = screenW * 0.8367 endY = screenH * 0.4583 endW = screenW * 0.1208 endH = screenH * 0.3151 addEventHandler("onClientResourceStart", resourceRoot, function() rec1 = dxDrawRectangle(screenW * 0.6486, screenH * 0.4583, screenW * 0.1208, screenH * 0.3151, tocolor(255, 255, 255, 255), false) exports.gie.guiAddInterpolateEffect( rec1, startX, startY, startW, startH, endX, endY, endW, endH, 5, Linear, Linear, 1 ) end )
  11. Nevermind I manage to remove the window by command Now I just need to know how to stop it from making the window everytime I click on the character
  12. by the way how would I do it so that it removes the window when I click on the player again?
×
×
  • Create New...