AboShanab Posted May 15, 2013 Posted May 15, 2013 (edited) السسلام عليككم ورحممة الله وبرككاتههه اليومم احاوول اسوي عد تناززلي .. استخدمت الكود اللي سواه حسسن ما ضبط addEventHandler("onClientRender", root, function() dxDrawText("Redirect To New Server In :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(num, 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end ) local num = 5 function Numper() num = num - 1 if num <= -2 then killTimer(NumberTimer) num = 5 end end NumberTimer = setTimer(Numper,1000,0) Edited May 17, 2013 by Guest
iMr.Dawix~# Posted May 15, 2013 Posted May 15, 2013 جرب local num = 5 function Numper() num = num - 1 if num >= -1 then killTimer(NumberTimer) num = 5 end end setTimer(Numper,5000,0) addEventHandler("onClientRender", root, function () dxDrawText("Redirect To New Server In : "..tonumber(num), 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(num, 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end)
فاّرس Posted May 15, 2013 Posted May 15, 2013 local num = 5 addEventHandler("onClientRender", root, function() dxDrawText("Redirect To New Server In :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tostring( num ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end ) Timer = setTimer( function () num = num - 1 if num <= -1 then killTimer(Timer) num = 0 end end,1000,0)
3NAD Posted May 15, 2013 Posted May 15, 2013 لم يتم التجربة local num = 5 addEventHandler ( "onClientRender", root, function ( ) dxDrawText("Redirect To New Server In :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText( ( num or "Error" ), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end ) function Numper ( ) num = ( num or 5 ) -1 if num < 0 then killTimer ( NumberTimer ) num = 5 end end NumberTimer = setTimer ( Numper, 1000, 0 )
iMr.Dawix~# Posted May 15, 2013 Posted May 15, 2013 سويت انا كذا ما ضبط كل شوي يرجع 5 من جديد local num = 5 local NumberT = setTimer(function () num = num - 1 if num == 0 then killTimer (NumberT) num = 5 end end,1000,0) addEventHandler("onClientRender", root, function () dxDrawText("Redirect To New Server In : ", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(tonumber(num), 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end) كود عناد عدل ^
кιηg-αвα∂у Posted May 17, 2013 Posted May 17, 2013 Label = guiCreateLabel(200,200,200,40,"Timer : ",false) local num = 5 function Numper() guiSetText(Label,"Timer : "..num) num = num - 1 if num <= -2 then guiSetVisible(Label,false) killTimer(NumberTimer) num = 5 end end -- اكتب الحدث الي يبدأ العد التنازلي guiSetVisible(Label,true) NumberTimer = setTimer(Numper,1000,0) -- نهاية الحدث
فاّرس Posted May 17, 2013 Posted May 17, 2013 للمرة الثانية كودي شغال ومجربة + تي تي احنا نصحح له ما لنا شغل بالحداثيات
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