Jw8. Posted June 19, 2019 Share Posted June 19, 2019 سلآم عليكم يعيال ابغى اسئلكم كيف اسوي للصوره ذي حركة ؟ dxDrawImage(screenW * 0.0000, screenH * -0.0117, screenW * 1.0000, screenH * 0.9950, "img/bb.png", 0, 0, 0, tocolor(136, 22, 232, 255), false) جربت اسويلها ما عرفت :] وحاولت بذي interpolateBetween ابغى اعملها لما تفتح الوحة يجي من هنا <-- Link to comment
SycroX Posted June 19, 2019 Share Posted June 19, 2019 46 minutes ago, DmAr511 said: سلآم عليكم يعيال ابغى اسئلكم كيف اسوي للصوره ذي حركة ؟ dxDrawImage(screenW * 0.0000, screenH * -0.0117, screenW * 1.0000, screenH * 0.9950, "img/bb.png", 0, 0, 0, tocolor(136, 22, 232, 255), false) جربت اسويلها ما عرفت :] وحاولت بذي interpolateBetween ابغى اعملها لما تفتح الوحة يجي من هنا <-- ورينا محاولتك Link to comment
Jw8. Posted June 19, 2019 Author Share Posted June 19, 2019 Just now, #x1AhMeD-09 said: ورينا محاولتك يهوو صلني ساعه وانا احاول :] Link to comment
SycroX Posted June 19, 2019 Share Posted June 19, 2019 (edited) 17 minutes ago, DmAr511 said: يهوو صلني ساعه وانا احاول :] تمام ورينا المحاوله عشان نصلحها لك Edited June 19, 2019 by #x1AhMeD-09 Link to comment
Jw8. Posted June 19, 2019 Author Share Posted June 19, 2019 19 minutes ago, #x1AhMeD-09 said: ورينا محاولتك ثواني لاني مسحتها اول شي حاولت بذي ماظبطت خخ اكيد تخبيص local now = getTickCount() local endTime = start + 2000 local elapsedTime = now - start local duration = endTime - start local progress = elapsedTime / duration local px, py, pz = getElementPosition(localPlayer) local x, y, z = interpolateBetween ( dx, dy, dz, dx+4, dy+4, dz, progress, "OutQuad") dxDrawImage(dx, dy, dz, dx+4, "img/bb.png", 0, 0, 0, tocolor(136, 22, 232, 255), false) Link to comment
#BrosS Posted June 19, 2019 Share Posted June 19, 2019 (edited) tick = getTickCount() function Draw() local x, y, z = interpolateBetween ( dx, dy, dz, dx+4, dy+4, dz, (getTickCount()-tick)/1400, "OutQuad") dxDrawImage(x, y, z, dx+4, "img/bb.png", 0, 0, 0, tocolor(136, 22, 232, 255), false) end addCommandHandler( "show", function() --... tick = getTickCount() addEventHandler("onClientRender",root,Draw) --... end ); Edited June 19, 2019 by #BrosS Link to comment
Jw8. Posted June 19, 2019 Author Share Posted June 19, 2019 5 minutes ago, #BrosS said: tick = getTickCount() function Draw() local x, y, z = interpolateBetween ( dx, dy, dz, dx+4, dy+4, dz, (getTickCount()-tick)/1400, "OutQuad") dxDrawImage(x, y, z, dx+4, "img/bb.png", 0, 0, 0, tocolor(136, 22, 232, 255), false) end addCommandHandler( "show", function() --... tick = getTickCount() --... end ); ماظبط Link to comment
#BrosS Posted June 19, 2019 Share Posted June 19, 2019 نسيت أضيف الحدث لول عدلتها + هذا مثال فقط انت وين استخدمتها Link to comment
Jw8. Posted June 19, 2019 Author Share Posted June 19, 2019 Just now, #BrosS said: نسيت أضيف الحدث لول عدلتها + هذا مثال فقط انت وين استخدمتها local x, y, z = interpolateBetween ( dx, dy, dz, dx+4, dy+4, dz, (getTickCount()-tick)/1400, "OutQuad") dxDrawImage(screenW * 0.0000, screenH * -0.0117, screenW * 1.0000, dx+4, "img/bb.png", 0, 0, 0, tocolor(136, 22, 232, 255), false) Link to comment
#BrosS Posted June 19, 2019 Share Posted June 19, 2019 Just now, DmAr511 said: x, y, z وظفهم يا اخي Link to comment
Jw8. Posted June 19, 2019 Author Share Posted June 19, 2019 local x, y, z = interpolateBetween ( dx, dy, dz, dx+4, dy+4, dz, (getTickCount()-tick)/1400, "OutQuad") dxDrawImage(x, y, z, dx+4, "img/bb.png", 0, 0, 0, tocolor(136, 22, 232, 255), false) Link to comment
Jw8. Posted June 19, 2019 Author Share Posted June 19, 2019 1 minute ago, #BrosS said: هيه جربه يقلي المشكله بذه السطر : local x, y, z = interpolateBetween ( dx, dy, dz, dx+4, dy+4, dz, (getTickCount()-tick)/1400, "OutQuad") Link to comment
Jw8. Posted June 19, 2019 Author Share Posted June 19, 2019 1 minute ago, #BrosS said: dx, dy, dz تأكد أنك معرف Just now, #BrosS said: dx, dy, dz تأكد أنك معرف بوش اعرفهم بـ setElementPosition ؟ Link to comment
#BrosS Posted June 19, 2019 Share Posted June 19, 2019 local aX, aY = interpolateBetween ( screenW * 0.0000, screenH * -0.0117, 0, screenW * 0.0000, screenH * 0.5117, 0, (getTickCount()-tick)/1400, "OutQuad") dxDrawImage(aX, aY, screenW * 1.0000, dx+4, "img/bb.png", 0, 0, 0, tocolor(136, 22, 232, 255), false) dx+4 اذا جاك خطأ ب هذي انت حطيتها وغيرها بالإحداثية الاصلية هيك اتوقع الصورة تجي من فوق وتنزل Link to comment
N3xT Posted June 19, 2019 Share Posted June 19, 2019 (edited) local sX, sY = guiGetScreenSize ( ) function Draw ( ) local animation = interpolateBetween ( sX + 50, 0, 0, ( sX / 2 ) - ( 50 / 2 ), 0, 0, ( getTickCount() - ( tick or 0 ) ) / 1000, "Linear" ) dxDrawImage ( animation, ( sY / 2 ) - ( 50 / 2 ), 50, 50, "img/bb.png", 0, 0, 0, tocolor ( 136, 22, 232, 255 ), false ) end addCommandHandler ( "show", function ( ) tick = getTickCount() addEventHandler ( "onClientRender", root, Draw ) end ) راح يجيب لك الصورة من اليمين الى نص الشاشة, الكود ناقص تحققات لكن المهم ايصال الفكرة Edited June 19, 2019 by N3xT 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