Jump to content

Tnx To The Best | عد تنازلي


Recommended Posts

السسلام عليككم ورحممة الله وبرككاتههه

اليومم احاوول اسوي عد تناززلي ..

استخدمت الكود اللي سواه حسسن ما ضبط

  
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 by Guest
Link to comment

جرب

  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) 
  
  
Link to comment

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) 
Link to comment

لم يتم التجربة

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 ) 

Link to comment

سويت انا كذا ما ضبط كل شوي يرجع 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) 
  

كود عناد عدل ^

Link to comment
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) 
        -- نهاية الحدث 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...