Jump to content

مساعده بالتايمر


+Source|>

Recommended Posts

سلام عليكم

الحين سويت اللوحه لما يقفلها ينتظر 10 ثواني عشان تفتح

 

ابي يجيه بشات

الرجاء الانتظار 10 ثواني

يضغط مره ثانيه يقوله

الرجاء الانتظار 9 ثواني

الخ

stime = 20000
timer = {}

bindKey( key, "down",
	function(player)
		if guiGetVisible( vipwnd ) then
			guiSetVisible( vipwnd, false )
			showCursor( false )
			timer[player] = setTimer( function() end, stime, 1 )
		else
		if isTimer (timer[player]) then outputChatBox( "#aa0000#Please Wait 5 Second"..stime, 0, 0, 0, true ) return end
			guiSetVisible( vipwnd, true )
			showCursor( true )
			guiMoveRightToLeft ( vipwnd )
			refreshweapon ()
			refreshskin ()
		end
	end
)

 

Link to comment
18 minutes ago, Source|> said:

سلام عليكم

الحين سويت اللوحه لما يقفلها ينتظر 10 ثواني عشان تفتح

 

ابي يجيه بشات

الرجاء الانتظار 10 ثواني

يضغط مره ثانيه يقوله

الرجاء الانتظار 9 ثواني

الخ


stime = 20000
timer = {}

bindKey( key, "down",
	function(player)
		if guiGetVisible( vipwnd ) then
			guiSetVisible( vipwnd, false )
			showCursor( false )
			timer[player] = setTimer( function() end, stime, 1 )
		else
		if isTimer (timer[player]) then outputChatBox( "#aa0000#Please Wait 5 Second"..stime, 0, 0, 0, true ) return end
			guiSetVisible( vipwnd, true )
			showCursor( true )
			guiMoveRightToLeft ( vipwnd )
			refreshweapon ()
			refreshskin ()
		end
	end
)

 

second = 10

bindKey( key, "down",
	function(player)
          if ( getTickCount ( ) - ( lastOpen or 0 ) >= second * 1000 ) then 
              if guiGetVisible( vipwnd ) then
                  guiSetVisible( vipwnd, false )
                  showCursor( false )
              else
                  guiSetVisible( vipwnd, true )
                  showCursor( true )
                  guiMoveRightToLeft ( vipwnd )
                  refreshweapon ()
                  refreshskin ()
              end
              lastOpen = getTickCount ( )
              else
              outputChatBox ( " أنتظر ".. math.ceil(( lastOpen or 0 ) / 1000).." من الثواني" )
          end
	end
)

 

Link to comment
2 minutes ago, iMr.WiFi..! said:

second = 10

bindKey( key, "down",
	function(player)
          if ( getTickCount ( ) - ( lastOpen or 0 ) >= second * 1000 ) then 
              if guiGetVisible( vipwnd ) then
                  guiSetVisible( vipwnd, false )
                  showCursor( false )
              else
                  guiSetVisible( vipwnd, true )
                  showCursor( true )
                  guiMoveRightToLeft ( vipwnd )
                  refreshweapon ()
                  refreshskin ()
              end
              lastOpen = getTickCount ( )
              else
              outputChatBox ( " أنتظر ".. math.ceil(( lastOpen or 0 ) / 1000).." من الثواني" )
          end
	end
)

 

في طريقه اسهل ؟؟

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