iMr.TZ[W]ER Posted January 22, 2015 Share Posted January 22, 2015 بسم الله الرحمن الرحيم السلام عليكم ورحمة الله تعالى وبركاته كيف الحال يا شباب ان شاء الله طيبين ابغا احد يشرحلي شلون استخدم التايمر لاني ابغا استخدمه على guiSetAlpha ومع العلم ان الفنكشن بدون اسم اللي يساعدني له 20 ريال امزح امزح لا تصدقون بانتظار مساعدتكم Link to comment
ALw7sH Posted January 22, 2015 Share Posted January 22, 2015 setTimer(function() guiSetAlpha(gui,guiGetAlpha(gui)+20) end,50,10) الكود مو ضابط بالضبط بس اهم شي تفهم الفكره Link to comment
iMr.TZ[W]ER Posted January 22, 2015 Author Share Posted January 22, 2015 ما فهمت انا ابي اعرف شلون ركبت الجملة كذا يعني التايمر شلون سويته كذا وهو كذا timer setTimer ( function theFunction, int timeInterval, int timesToExecute, [ var arguments... ] ) والاند حقت ايش Link to comment
ALw7sH Posted January 22, 2015 Share Posted January 22, 2015 ما فهمتانا ابي اعرف شلون ركبت الجملة كذا يعني التايمر شلون سويته كذا وهو كذا timer setTimer ( function theFunction, int timeInterval, int timesToExecute, [ var arguments... ] ) والاند حقت ايش فيه اكثر من طريقة استخدام للتايمر function alpha() guiSetAlpha(gui,guiGetAlpha(gui)+20) end setTimer(alpha,50,10) setTimer(guiSetAlpha,50,10,gui,guiGetAlpha(gui)+20) -- تقريباً هي نفس الي فوق setTimer(function() guiSetAlpha(gui,guiGetAlpha(gui)+20) end,50,10) كل الطرق هي نفسها في النهايه انا ماغيرت شي بأرقمنتات الفنكشن بس بأخر طريقة انا كتبت الفنكشن داخل فنكشن السيت تايمر ماستخدمت فنكشن خارجي Link to comment
iMr.TZ[W]ER Posted January 22, 2015 Author Share Posted January 22, 2015 فهمت بكرا بجرب ع كود فتح النافذة وبنزله لو ضبط Link to comment
iMr.TZ[W]ER Posted January 26, 2015 Author Share Posted January 26, 2015 الكود سويته والحمد لله بمساعدة الاخ شويكي هذا كودي يفتح ويقفل اللوحة mywindow = guiCreateWindow(258, 44, 256, 466, "اللوحة", false) guiSetVisible ( mywindow, false ) bindKey ( "F10", "down", function() if ( guiGetVisible ( mywindow ) == false ) then guiSetVisible ( mywindow, true ) guiSetInputEnabled ( true ) showCursor ( true ) elseif ( guiGetVisible ( mywindow ) == true ) then guiSetVisible ( mywindow, false ) guiSetInputEnabled ( false ) showCursor ( false ) end end ) جيت احاول احاول ما ضبط شي معي ساعدني الاخ شويكي وسواه كذا mywindow = guiCreateWindow(258, 44, 256, 466, "اللوحة", false) guiSetAlpha ( mywindow,0 ) guiSetVisible ( mywindow, false ) bindKey ( "F10", "down", function() if guiGetVisible ( mywindow ) then guiSetVisible ( mywindow, false ) guiSetAlpha ( mywindow,0 ) showCursor ( false ) else guiSetVisible ( mywindow, true ) setTimer ( SetAlpha, 50, 10 ) showCursor ( true ) end end ) function SetAlpha() if guiGetVisible ( mywindow ) then guiSetAlpha (mywindow, guiGetAlpha ( mywindow )+0.1 ) end end وشغال طبعا لكن ما عجبني لانه غير على كودي كثير فقلت كليني احلله بشويش ومع شوية تمخمخ سويت كودي وضبط وهذا هو mywindow = guiCreateWindow(258, 44, 256, 466, "اللوحة", false) guiSetAlpha ( mywindow,0 ) guiSetVisible ( mywindow, false ) bindKey ( "F10", "down", function() if ( guiGetVisible ( mywindow ) == false ) then guiSetVisible ( mywindow, true ) guiSetAlpha ( mywindow,0 ) setTimer ( trans, 80, 5 ) guiSetInputEnabled ( true ) showCursor ( true ) elseif ( guiGetVisible ( mywindow ) == true ) then guiSetVisible ( mywindow, false ) guiSetInputEnabled ( false ) showCursor ( false ) end end ) function trans() if ( guiGetVisible ( mywindow ) == true ) then guiSetAlpha ( mywindow, guiGetAlpha ( mywindow )+0.2 ) end 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