فاّرس Posted June 8, 2013 Share Posted June 8, 2013 local num = 93000 local stat = false function Updated() local m,s,ss = toTime(num) dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(m .. ":" .. s .. ":" .. ss, 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end addEventHandler("onClientVehicleStartEnter",root,function() addEventHandler("onClientRender", root,Updated) stat = true end) addEventHandler("onClientVehicleStartExit",root,function() removeEventHandler("onClientRender",root,Updated) stat = false end) Timer = setTimer( function () if stat == false then return end num = num - 1 if num <= -1 then if isTimer(Timer) then killTimer(Timer) Timer = nil removeEventHandler("onClientRender",root,Updated) num = 0 end end end,1000,0) function toTime(ms) -- missiontimer << if not ms then return '' end if ms < 0 then return "0","00","00" end local centiseconds = tostring(math.floor(math.fmod(ms, 1000)/10)) if #centiseconds == 1 then centiseconds = '0' .. centiseconds end local s = math.floor(ms / 1000) local seconds = tostring(math.fmod(s, 60)) if #seconds == 1 then seconds = '0' .. seconds end local minutes = tostring(math.floor(s / 60)) return minutes, seconds, centiseconds end ما شاء الله عرفت تفكر... Link to comment
iMr.Dawix~# Posted June 8, 2013 Share Posted June 8, 2013 اذا يبيه يوم ينزل , local num = "33" local Number = "1:" function Updated() Dx = dxDrawText("Time :", 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) dxDrawText(tostring( Number ), 370, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end addEventHandler("onClientVehicleStartEnter",root,function() addEventHandler("onClientRender", root,Updated) end) addEventHandler("onClientVehicleStartExit",root,function() removeEventHandler("onClientRender",root,Updated) end) Timer = setTimer( function () num = num - 1 if num <= -1 then if isTimer(Timer) then killTimer(Timer) Timer = nil end removeEventHandler("onClientRender",root,Updated) num = 0 end end,1000,0) -_-" function T() local num = 133 addEventHandler("onClientRender", root, function() dxDrawText("Time :", 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 ) end addEventHandler("onClientVehicleEnter", root,function () addEventHandler("onClientRender",root,T) Timer = setTimer(TN,1000,0) end) addEventHandler("onClientVehicleEnter", root,function () removeEventHandler("onClientRender",root,T) Timer = nil end) function TN() num = num - 1 if num <= -1 and isElement(Timer) then killTimer(Timer) num = 0 end end Link to comment
|Mr|-Talal07-| Posted June 8, 2013 Share Posted June 8, 2013 local num = 93000 local stat = false function Updated() local m,s,ss = toTime(num) dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(m .. ":" .. s .. ":" .. ss, 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end addEventHandler("onClientVehicleStartEnter",root,function() addEventHandler("onClientRender", root,Updated) stat = true end) addEventHandler("onClientVehicleStartExit",root,function() removeEventHandler("onClientRender",root,Updated) stat = false end) Timer = setTimer( function () if stat == false then return end num = num - 1 if num <= -1 then if isTimer(Timer) then killTimer(Timer) Timer = nil removeEventHandler("onClientRender",root,Updated) num = 0 end end end,1000,0) function toTime(ms) -- missiontimer << if not ms then return '' end if ms < 0 then return "0","00","00" end local centiseconds = tostring(math.floor(math.fmod(ms, 1000)/10)) if #centiseconds == 1 then centiseconds = '0' .. centiseconds end local s = math.floor(ms / 1000) local seconds = tostring(math.fmod(s, 60)) if #seconds == 1 then seconds = '0' .. seconds end local minutes = tostring(math.floor(s / 60)) return minutes, seconds, centiseconds end ما شاء الله عرفت تفكر... ???? Link to comment
فاّرس Posted June 8, 2013 Share Posted June 8, 2013 local num = 93000 local stat = false function Updated() local m,s,ss = toTime(num) dxDrawText("Time :", 202, 192, 656, 222, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText(m .. ":" .. s .. ":" .. ss, 403, 272, 458, 299, tocolor(208, 224, 30, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) end addEventHandler("onClientVehicleStartEnter",root,function() addEventHandler("onClientRender", root,Updated) stat = true end) addEventHandler("onClientVehicleStartExit",root,function() removeEventHandler("onClientRender",root,Updated) stat = false end) Timer = setTimer( function () if stat == false then return end num = num - 1 if num <= -1 then if isTimer(Timer) then killTimer(Timer) Timer = nil removeEventHandler("onClientRender",root,Updated) num = 0 end end end,1000,0) function toTime(ms) -- missiontimer << if not ms then return '' end if ms < 0 then return "0","00","00" end local centiseconds = tostring(math.floor(math.fmod(ms, 1000)/10)) if #centiseconds == 1 then centiseconds = '0' .. centiseconds end local s = math.floor(ms / 1000) local seconds = tostring(math.fmod(s, 60)) if #seconds == 1 then seconds = '0' .. seconds end local minutes = tostring(math.floor(s / 60)) return minutes, seconds, centiseconds end ما شاء الله عرفت تفكر... ???? اقول فكرت زين يوم حطيت حق الميسون تايم, 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