Jump to content

تعديل علي خطاء


Recommended Posts

السلام عليكم

انا مسوي عد تنازلي للساعه

يعني مثلا

01:00:00

00:59:60

00:59:59

00:59:58

لين يصير الوقت المتبقي 0

ويسوي الي ابيه ال هو

# يطلع بالشات

local Hour = 1 -- هنا عدد الساعات

local Min = 0
local Sec = 0 

 
function time() 
    if Hour < 10 then
    Hour = "0"..Hour
    else
    Hour = Hour
    end
    if Min < 10 then
    Min = "0"..Min
    else
    Min = Min
    end
    if Sec < 10 then
    Sec = "0"..Sec
    else
    Sec = Sec
    end
    outputChatBox(Hour..":"..Min..":"..Sec,root, 255, 0, 0 )   
    
    Sec = Sec -1 
    if Sec <= 0 then
        Min = Min - 1
        sec = 60
    if Min <= 0 then
        Hour = Hour - 1
        Min = 60
    if Hour <= 0 and Min <= 0 and Sec <= 0 then
           Hour = 0
           Min = 0
           Sec = 0
           killTimer ( Timer )
           outputChatBox ("#",root, 255, 0, 0 )
    end
    end
    end
end
Timer = setTimer(time,1000,0)

؟

Edited by MA[S]RIY
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...