CRoW,,# Posted May 22, 2013 Share Posted May 22, 2013 السلام عليكم ابي تصحيح لذا الكود ابيه اذا ضغط ع زر تتلون كل الازرار if ( GUIEditor.button[5] ) then setTimer(function() for _, random in ipairs(getElementsByType('gui-button',root)) do guiSetProperty(random, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end end, 250, 0) end Link to comment
iPrestege Posted May 22, 2013 Share Posted May 22, 2013 لم يتم التجربة : -- # Client Side : addEventHandler("onClientGUIClick",GUIEditor.button[5], function ( ) Color ( ) end,false ) function Color ( ) if isTimer ( Timer ) then killTimer ( Timer ) end Timer = setTimer( function( ) for _, random in ipairs(getElementsByType('gui-button',root)) do guiSetProperty(random, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end end,250,0 ) end Link to comment
CRoW,,# Posted May 22, 2013 Author Share Posted May 22, 2013 وين الفنكشن وين الحدث؟ مسويهه بس ما طرحتهه Link to comment
jafar Posted May 22, 2013 Share Posted May 22, 2013 وين الفنكشن وين الحدث؟ مسويهه بس ما طرحتهه جرب كود برستيج Link to comment
iPrestege Posted May 22, 2013 Share Posted May 22, 2013 متأكد من متغير الزر ؟ و متأكد انة كلنت debugscript 3 ? Link to comment
CRoW,,# Posted May 22, 2013 Author Share Posted May 22, 2013 متأكد من متغير الزر ؟ و متأكد انة كلنت debugscript 3 ? ضبط خلاص مشكور كانت مشكلة بالنافذة Link to comment
CRoW,,# Posted May 22, 2013 Author Share Posted May 22, 2013 طيب اذا ابيه ليبلات يالغالي يصير كذا addEventHandler("onClientGUIClick",GUIEditor.button[5], function ( ) M ( ) end,false ) function M ( ) if isTimer ( TM ) then killTimer ( TM ) theTimer = nil end TM = setTimer( function( ) for _,k in ipairs ( getElementsByType("gui-label",root)) do guiLabelSetColor ( k, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end end,250,1) ) end ؟ Link to comment
iPrestege Posted May 22, 2013 Share Posted May 22, 2013 addEventHandler("onClientGUIClick",GUIEditor.button[5], function ( ) M ( ) end,false ) function M ( ) if isTimer ( TM ) then killTimer ( TM ) TM = nil end TM = setTimer( function( ) for _,k in ipairs ( getElementsByType("gui-label",root)) do guiLabelSetColor ( k, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end end,250,0 ) end Link to comment
CRoW,,# Posted May 22, 2013 Author Share Posted May 22, 2013 addEventHandler("onClientGUIClick",GUIEditor.button[5], function ( ) M ( ) end,false ) function M ( ) if isTimer ( TM ) then killTimer ( TM ) TM = nil end TM = setTimer( function( ) for _,k in ipairs ( getElementsByType("gui-label",root)) do guiLabelSetColor ( k, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end end,250,0 ) end وش كان الخطا في كودي Link to comment
iPrestege Posted May 22, 2013 Share Posted May 22, 2013 line 10 = شيء ماهو معروف اصلا ماهو موجود line 17 = التايمر ماهو متكرر :') Link to comment
CRoW,,# Posted May 22, 2013 Author Share Posted May 22, 2013 اسفين ع الازعاج ي طويل العمر لكن ابيهه اذا ضغط مرة يلغي العملية سويتهه بنفس الطريقة ذيك لكنه ما ضبط طال عمرك addEventHandler("onClientGUIClick",GUIEditor.button[5], function ( ) Color ( ) end,false ) function Color ( ) if isTimer ( Timer ) then killTimer ( Timer ) Clickedbutton = not Clickedbutton theTimer = nil end if not Clickedbutton then Timer = setTimer( function( ) for _, random in ipairs(getElementsByType('gui-button',root)) do guiSetProperty(random, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end end,250,0 Clickedbutton = not Clickedbutton ) end addEventHandler("onClientGUIClick",GUIEditor.button[9], function ( ) M ( ) end,false ) function M ( ) if isTimer ( TM ) then killTimer ( TM ) Clickedbutton = not Clickedbutton TM = nil end if not Clickedbutton then TM = setTimer( function( ) for _,k in ipairs ( getElementsByType("gui-label",root)) do guiLabelSetColor ( k, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end end,250,0 Clickedbutton = not Clickedbutton ) end Link to comment
iPrestege Posted May 22, 2013 Share Posted May 22, 2013 (edited) -- # Client Side : addEventHandler("onClientGUIClick",GUIEditor.button[5], function ( ) ColorButtons ( ) end,false ) addEventHandler("onClientGUIClick",GUIEditor.button[9], function ( ) ColorLabel ( ) end,false ) function ColorButtons ( ) if not isTimer ( TimerButton ) then TimerButton = setTimer ( function( ) for _, random in ipairs(getElementsByType('gui-button',root)) do guiSetProperty(random, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end end,250,0 ) else if isTimer ( TimerButton ) then killTimer ( TimerButton ) TimerButton = nil for _,v in next,getElementsByType('gui-button',root) do guiSetProperty(v,"NormalTextColour","FFFFFFFF") end end end end function ColorLabel ( ) if not isTimer ( TimerLabel ) then TimerLabel = setTimer( function( ) for _, random in ipairs(getElementsByType('gui-label',root)) do guiLabelSetColor(random,math.random(255), math.random(255), math.random(255)) end end,250,0 ) else if isTimer ( TimerLabel ) then killTimer ( TimerLabel ) TimerLabel = nil for _,v in next,getElementsByType('gui-label',root) do guiLabelSetColor(v,255,255,255) end end end end Edited May 22, 2013 by Guest Link to comment
CRoW,,# Posted May 22, 2013 Author Share Posted May 22, 2013 اممم يتوقف الفلاش حق الازار لكن الالوان تبقا موجود +تلوين الليبل ما اتشغل Link to comment
iPrestege Posted May 22, 2013 Share Posted May 22, 2013 انسخة للمرهـ الاخيرهـ ماجربتة Link to comment
CRoW,,# Posted May 22, 2013 Author Share Posted May 22, 2013 -- # Client Side : addEventHandler("onClientGUIClick",GUIEditor.button[5], function ( ) ColorButtons ( ) end,false ) addEventHandler("onClientGUIClick",GUIEditor.button[9], function ( ) ColorLabel ( ) end,false ) function ColorButtons ( ) if not isTimer ( TimerButton ) then TimerButton = setTimer ( function( ) for _, random in ipairs(getElementsByType('gui-button',root)) do guiSetProperty(random, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end end,250,0 ) else if isTimer ( TimerButton ) then killTimer ( TimerButton ) TimerButton = nil for _,v in next,getElementsByType('gui-button',root) do guiSetProperty(v,"NormalTextColour","FFFFFFFF") end end end end function ColorLabel ( ) if not isTimer ( TimerLabel ) then TimerLabel = setTimer( function( ) for _, random in ipairs(getElementsByType('gui-label',root)) do guiLabelSetColor(random,math.random(255), math.random(255), math.random(255)) end end,250,0 ) else if isTimer ( TimerLabel ) then killTimer ( TimerLabel ) TimerLabel = nil for _,v in next,getElementsByType('gui-label',root) do guiLabelSetColor(v,255,255,255) end end end end يعطيك الف عافية يالغالي ما تقصر ابد بسس عندي سوال ذي من وين جت guiLabelSetColor(v,255,255,255) Link to comment
iPrestege Posted May 22, 2013 Share Posted May 22, 2013 جبت كل اللبلات بـ جدول و حطيت لهم ابيض ذذ اللون ذذ Link to comment
iPrestege Posted May 22, 2013 Share Posted May 22, 2013 في اللوب root ما يحتاج إنك تحط عارف بس صلحتة بـ زر لا اكثر Link to comment
CRoW,,# Posted May 23, 2013 Author Share Posted May 23, 2013 في اللوب root ما يحتاج إنك تحط يعني احطها resourceRoot Link to comment
#Al-Ha[J]aRii Posted May 23, 2013 Share Posted May 23, 2013 في اللوب root ما يحتاج إنك تحط يعني احطها resourceRoot resourceRoot = فقط للايفنت "onResourceStart" "onClientResourceStart" 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