MGHooLBeeh Posted July 25, 2019 Share Posted July 25, 2019 السلام عليكم ... الحين انا سويت dxdrawloading عند شاشة تسجيل دخول تمام بدي لما يخلص تحميل ذا شريط يختفي والاعبين يعرفو يسجلو Link to comment
MGHooLBeeh Posted July 25, 2019 Author Share Posted July 25, 2019 function draw () dxDrawLoading(196*sx/800, 482*sy/600,422*sx/800, 58*sy/600, 196*sx/800 , 450*sy/600 ,1.00*sx/800,tocolor(0,0,0,170),tocolor(0,255,0,170),5000) --outputChatBox("Done Downloading",0,255,0) setTimer(stopDraw, 5000,1) end addEventHandler("onClientRender",root,draw) stopDraw() removeEventHandler("onClientRender",root,draw) end local start = getTickCount() function dxDrawLoading (x, y, width, height, x2, y2, size, color, color2, second) local now = getTickCount() local seconds = second or 5000 local color = color or tocolor(0,0,0,170) local color2 = color2 or tocolor(255,255,0,170) local size = size or 1.00 local with = interpolateBetween(0,0,0,width,0,0, (now - start) / ((start + seconds) - start), "Linear") local text = interpolateBetween(0,0,0,100,0,0,(now - start) / ((start + seconds) - start),"Linear") --dxDrawText ( "Loading ... "..math.floor(text).."%", x2, y2 , width, height, tocolor ( 0, 255, 0, 255 ), size, "pricedown" ) dxDrawRectangle(x, y ,width ,height -10, color) dxDrawRectangle(x, y, with ,height -10, color2) end Link to comment
HassoN Posted July 25, 2019 Share Posted July 25, 2019 function draw () dxDrawLoading(196*sx/800, 482*sy/600,422*sx/800, 58*sy/600, 196*sx/800 , 450*sy/600 ,1.00*sx/800,tocolor(0,0,0,170),tocolor(0,255,0,170),5000) if (not isTimer(myTimer)) then myTimer = setTimer(stopDraw, 5000, 1) end end addEventHandler("onClientRender",root,draw) stopDraw() removeEventHandler("onClientRender", root, draw) end local start = getTickCount() function dxDrawLoading (x, y, width, height, x2, y2, size, color, color2, second) local now = getTickCount() local seconds = second or 5000 local color = color or tocolor(0,0,0,170) local color2 = color2 or tocolor(255,255,0,170) local size = size or 1.00 local with = interpolateBetween(0,0,0,width,0,0, (now - start) / ((start + seconds) - start), "Linear") local text = interpolateBetween(0,0,0,100,0,0,(now - start) / ((start + seconds) - start),"Linear") --dxDrawText ( "Loading ... "..math.floor(text).."%", x2, y2 , width, height, tocolor ( 0, 255, 0, 255 ), size, "pricedown" ) dxDrawRectangle(x, y ,width ,height -10, color) dxDrawRectangle(x, y, with ,height -10, color2) end 1 Link to comment
MGHooLBeeh Posted July 25, 2019 Author Share Posted July 25, 2019 28 minutes ago, HassoN said: function draw () dxDrawLoading(196*sx/800, 482*sy/600,422*sx/800, 58*sy/600, 196*sx/800 , 450*sy/600 ,1.00*sx/800,tocolor(0,0,0,170),tocolor(0,255,0,170),5000) if (not isTimer(myTimer)) then myTimer = setTimer(stopDraw, 5000, 1) end end addEventHandler("onClientRender",root,draw) stopDraw() removeEventHandler("onClientRender", root, draw) end local start = getTickCount() function dxDrawLoading (x, y, width, height, x2, y2, size, color, color2, second) local now = getTickCount() local seconds = second or 5000 local color = color or tocolor(0,0,0,170) local color2 = color2 or tocolor(255,255,0,170) local size = size or 1.00 local with = interpolateBetween(0,0,0,width,0,0, (now - start) / ((start + seconds) - start), "Linear") local text = interpolateBetween(0,0,0,100,0,0,(now - start) / ((start + seconds) - start),"Linear") --dxDrawText ( "Loading ... "..math.floor(text).."%", x2, y2 , width, height, tocolor ( 0, 255, 0, 255 ), size, "pricedown" ) dxDrawRectangle(x, y ,width ,height -10, color) dxDrawRectangle(x, y, with ,height -10, color2) end الحيين الوحة ما تشتغل وجبتلي هذة الرسالة في debug <eof> expected near 'end' Link to comment
HassoN Posted July 25, 2019 Share Posted July 25, 2019 ما اشوف خلل بالكود ، في اي سطر الخلل؟ Link to comment
MGHooLBeeh Posted July 25, 2019 Author Share Posted July 25, 2019 خــلاص اشتغلت اخوي بس كان لازم اضيف function stopdraw() علشان هيك ما كانت تشتغل مشكـــور Link to comment
HassoN Posted July 25, 2019 Share Posted July 25, 2019 والله حتى انا ما انتبهت على الفنكشن حياك الله Link to comment
MGHooLBeeh Posted July 25, 2019 Author Share Posted July 25, 2019 Just now, HassoN said: والله حتى انا ما انتبهت على الفنكشن حياك الله هههههههه ولا يهمك عادي مهم انها اشتغلت شكرا جدا لك 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