Jump to content

كود الوقت


Recommended Posts

  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

theTimer = setTimer(function() end, 1000, 10) -- تايمر مابيسوي شيء 
  
function timerDetails() 
    remaining, executesRemaining, totalExecutes = getTimerDetails(theTimer) -- اخذ تفاصيل التايمر 
-- كم تبقى ,التكرارات المتبقيه, عدد التكرارات الكلي  
    if (remaining and executesRemaining and totalExecutes) then 
        outputChatBox("الوقت المتبقي في هذه الثانيه: "..remaining.." التكرارات المتبقيه: "..executesRemaining.."  التكرارت الكلي: "..totalExecutes) 
    else 
        outputChatBox("المؤقت لم يعد موجوداً") 
    end 
end 
addCommandHandler("timerdetails", timerDetails) 

Link to comment
theTimer = setTimer(function() end, 1000, 10) -- تايمر مابيسوي شيء 
  
function timerDetails() 
    remaining, executesRemaining, totalExecutes = getTimerDetails(theTimer) -- اخذ تفاصيل التايمر 
-- كم تبقى ,التكرارات المتبقيه, عدد التكرارات الكلي  
    if (remaining and executesRemaining and totalExecutes) then 
        outputChatBox("الوقت المتبقي في هذه الثانيه: "..remaining.." التكرارات المتبقيه: "..executesRemaining.."  التكرارت الكلي: "..totalExecutes) 
    else 
        outputChatBox("المؤقت لم يعد موجوداً") 
    end 
end 
addCommandHandler("timerdetails", timerDetails) 

مشكؤوؤور والله انكك شنب :mrgreen:

Link to comment

.. ليه حذفت الرد

اانا اقصد اذا كان مثلاً الوقت اللي حطيته انت

600000

-- تسوي متغير  
seconds = 0  
-- تتاكد ما اذا كان الوقت المتبقي 600000 
if remaining == 600000 then seconds = 600 end -- تحط قيمة 600 للثواني 
  

Link to comment
ههههههه جاك سبارو .. لول

وش تبي تسوي بالضبط؟

..

تقدر تتاكد من عدد الثواني

اذاكان 1000 , يصير المتغير 1

مثلاً

seconds = 0 
if remaining == 1000 then seconds = 1 end 
  

ضض1

مشكوؤوؤر شباب

طيب ابغى ثواني ودقائق كيف ؟

وابغاه يكون ملون حاولت الونه ماضبط

outputChatBox(" 7FFF00 timer : "..remaining.." 7FFF00 seconds", source, 255, 255, 255, true)  

وشكككرا....

Link to comment
وش حاط انت بالفنكشن الي ربطت فيها + تبي الكلام يطلع للكل ولا للاعب الي كتب الامر؟

addCommandHandler

؟

ابغى للاعب اللي كتب الامر وهذا الكود كامل

timer = setTimer ( function() 
        outputChatBox ( "5 second delay text!" ) 
    end, 20000, 1 ) 
  
  
addCommandHandler("timer", 
function ( ) 
remaining = getTimerDetails(timer) 
seconds = remaining * 1000 
outputChatBox(" 7FFF00 timer : "..remaining.." 7FFF00 seconds", root, 255, 255, 255, true)  
      end ) 

Link to comment
وش حاط انت بالفنكشن الي ربطت فيها + تبي الكلام يطلع للكل ولا للاعب الي كتب الامر؟

addCommandHandler

؟

ابغى للاعب اللي كتب الامر وهذا الكود كامل

timer = setTimer ( function() 
       outputChatBox ( "5 second delay text!" ) 
 end, 20000, 1 ) 
  
  
addCommandHandler("timer", 
function ( ) 
remaining = getTimerDetails(timer) 
seconds = remaining * 1000 
outputChatBox(" 7FFF00 timer : "..remaining.." 7FFF00 seconds", root, 255, 255, 255, true)  
      end ) 

  
timer = setTimer ( function() 
    end, 20000, 1 ) 
 addCommandHandler("timer", 
function (player) 
remaining = getTimerDetails(timer) 
seconds = remaining / 1000 
outputChatBox(" 7FFF00 timer : "..seconds.." 7FFF00 seconds", player, 255, 255, 255, true) 
      end ) 

الوقت بالتايمر يكون بالملي ثانيه

والملي ثانيه هي الثانيه مضروبه على 1000

والثانيه هي الملي ثانيه مقسومه على 1000

Edited by Guest
Link to comment
وش حاط انت بالفنكشن الي ربطت فيها + تبي الكلام يطلع للكل ولا للاعب الي كتب الامر؟

addCommandHandler

؟

ابغى للاعب اللي كتب الامر وهذا الكود كامل

timer = setTimer ( function() 
       outputChatBox ( "5 second delay text!" ) 
 end, 20000, 1 ) 
  
  
addCommandHandler("timer", 
function ( ) 
remaining = getTimerDetails(timer) 
seconds = remaining * 1000 
outputChatBox(" 7FFF00 timer : "..remaining.." 7FFF00 seconds", root, 255, 255, 255, true)  
      end ) 

  
timer = setTimer ( function() 
    end, 20000, 1 ) 
 addCommandHandler("timer", 
function (player) 
remaining = getTimerDetails(timer) 
if remaining == 1000 then seconds = 1  
outputChatBox(" 7FFF00 timer : "..seconds.." 7FFF00 seconds", player, 255, 255, 255, true) 
elseif remaining == 2000 then seconds = 2 
outputChatBox(" 7FFF00 timer : "..seconds.." 7FFF00 seconds", player, 255, 255, 255, true) 
elseif remaining == 3000 then seconds = 3 
outputChatBox(" 7FFF00 timer : "..seconds.." 7FFF00 seconds", player, 255, 255, 255, true) 
elseif remaining == 4000 then seconds = 4 
outputChatBox(" 7FFF00 timer : "..seconds.." 7FFF00 seconds", player, 255, 255, 255, true) 
end 
      end ) 

ماضبط

وليه كررتها وش المقصد ؟

Link to comment
يب لانك ماحطيت # قبل كود اللون , والمشكله قبل كانت لانك كاتب source

والsource مو محدد

غلط وواضحح :shock:

مشكؤؤر :mrgreen:

العفو هههههه ماركزت عليها

بس كانت بالفعل من source

لانك ماحددتها

وايضاً لانك نسيت تحط #

قبل كود اللون

خخخخخخخخخخـ

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...