Turbesz Posted November 20, 2020 Posted November 20, 2020 I tried this way (this is not the full code), and when i insert a new data to the table the rectangle appears with animation, and when i insert again, then existing and new rectangle appears with animation too, how to set animation only for the new one? (sry, my english is very bad) local start = getTickCount() local one, one1 = 1, (sy_/2+800) * ym local two, two1 = 1, (sy_/2+300) * ym function teszt() for k, v in ipairs(notifications) do local now = getTickCount() local x,y = interpolateBetween(one, one1, 0, two, two1, 0, (now - start) / ((start + 600) - start), "Linear") dxDrawRectangle((sx_-1900) * xm, y - (31*k), dxGetTextWidth("test", 0.9, myFont,true)+52, 30 * ym, tocolor(0, 0, 0, 120)) end end addEventHandler("onClientRender",root,teszt) addEventHandler("onClientPlayerChangeNick", root, function(l_4_0, l_4_1) start = getTickCount() end ) What if the only way not to feel bad, is to stop feeling, anything at all, forever? - Hannah Baker I cost a girl her life because I was afraid to love her... - Clay Jensen ~ 13 Reasons Why
Moderators IIYAMA Posted November 20, 2020 Moderators Posted November 20, 2020 50 minutes ago, Turbesz said: this is not the full code Your current code contains fragments from a decompiled script. Locked 1 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Moderators IIYAMA Posted November 20, 2020 Moderators Posted November 20, 2020 @Turbesz I can see that you are confused by my reply. These are the fragments of a decompiled script: 1 hour ago, Turbesz said: function(l_4_0, l_4_1) I am not going to start a discussion with you about how those slipped in to your code. When I see reverse-engineered variable names, the topic is locked. (Not the end of the world...) 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Recommended Posts