Dice Posted August 12, 2013 Posted August 12, 2013 when maximize is clicked... setTimer ( function() local x, y = guiGetSize ( win, false ) if y <= 537 then guiSetSize ( win, x, y + 0.04, false ) end end, 50, 0 ) the code literally does nothing. would onClientRender do the trick?
tosfera Posted August 12, 2013 Posted August 12, 2013 Nope, but why do you want to use this functions? Maybe there is another way. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
xXMADEXx Posted August 12, 2013 Posted August 12, 2013 Try this: function doAnimation ( ) local x, y = guiGetSize ( win, false ) if ( y <= 537 ) then guiSetSize ( win, x, y + 0.04, false ) else removeEventHandler ( "onClientRender", root, doAnimation ) end end addEventHandler ( "onClientRender", root, doAnimation ) The Ultimate Lua Tutorial! | MTA PHP SDK
bandi94 Posted August 12, 2013 Posted August 12, 2013 Ofc the "code literally does nothing" . You are using Y+0.04 with absolute system that mean very very litel. And with that timmer you will need 1.2 secound only to grow it 1px. @xXMADEXx 's code it's better bk it's faster but still +0.04 very low , with 60fps you will need +/- 0.25 s to move it 1 px so you will move it 4px/s Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
Dealman Posted August 12, 2013 Posted August 12, 2013 Use this instead; interpolateBetween If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
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