Jump to content

x[مشكلة]x الزر مايقفل


Recommended Posts

السلام عليكم شباب

عندي مشكلة وهي

لما اضغط الزر 

guiSetEnabled( button1,true)
setTimer(guiSetEnabled,5000,0,button1,false)

يقفل تمام لكن لما يفتح اضغطه مايقفل ليش ؟

Edited by yasin0
Link to comment
20 minutes ago, #_iMr.[E]coo said:

guisetEnabled ( aButton , false )
setTimer ( function ( ) 
    guiSetEnabled ( aButton , true )
end , 1000*5 , 1 )

 

guiSetEnabled

وممكن يسويها كذا اسهل له

من كتر الاكواد ممكن يتلخبط بالملف..

EnabledButton = function ( btn, timer )
    if btn and timer then
        guiSetEnabled( btn, false )
        setTimer( guiSetEnabled,timer,1,btn, true )
    end
end;

btn = اسم الزر حقك التبيه يقفل ويفتح

timer = المده التبيها تفتح فيها

مثال

EnabledButton ( button1, 5000 )

 

Edited by Deativated
Link to comment
2 minutes ago, #STZ said:

 addEventHandler ( "onClientGUIClick",root,
 function()
 if ( source == Button ) then
guiSetEnabled( Button,false)
setTimer(guiSetEnabled,5000,1,Button,true)
end
end
)

كودي الي فوق صح +_+

حقك الي فوق غلط لانه بيكرر نفس الشيء وهو اصلاً مقفل

+ ونعرف انك من كبار المبرمجين بس ياخي خله يتعلم ويسوي الكود بنفسه ذ

Link to comment
5 hours ago, yasin0 said:

مافهمت قصدي انا اقصد

كل ماضغط الزر يقفل 5 ثواني ويرجع

@#STZ

^ ؟ +

ماقصد هذا الكود اقصد ذا

5 hours ago, #STZ said:
  Reveal hidden contents


 
guiSetEnabled( button1,false)
setTimer(guiSetEnabled,5000,1,button1,true)

 

 

 

Edited by iMr.WiFi..!
Link to comment

جرب هذا الكود وحطه تحت كود الزر

addEventHandler("onClientGUIClick",guiRoot,function()
 if ( source == button1 ) then
guiSetEnabled(button1, false)
setTimer(guiSetEnabled,40000,1,button1, true) -- 40000 = الوقت
 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...