^#Dream Posted July 16, 2014 Share Posted July 16, 2014 السلام عليكم انا عندي مشكلة سويت كذا function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) local mainBackground = guiCreateStaticImage(x2, y2, width2, height2, "window.png", relative2) local mainBackgroundLabel = guiCreateLabel(0, 0, 0, 0, titleBarText2, false, mainBackground) guiSetEnabled(mainBackgroundLabel, false) return mainBackground end function guiCreateButton( x2, y2, width2, height2, titleBarText2, relative2, ksa ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Button.png", relative2, ksa ) local w, h = guiGetSize ( mainBackground, false ) local mainBackgroundLabel = guiCreateLabel ( x2, y2, w, h, titleBarText2, false, mainBackground ) guiSetFont ( mainBackgroundLabel, font ) guiSetEnabled ( mainBackgroundLabel, false ) guiLabelSetHorizontalAlign(mainBackgroundLabel, "center") guiLabelSetVerticalAlign(mainBackgroundLabel, "center") guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 ) addEventHandler( "onClientMouseEnter", root, function () if source == mainBackground then guiStaticImageLoadImage(mainBackground,"Button2.png") guiLabelSetColor(mainBackgroundLabel, 255, 0, 0) playSoundFrontEnd ( 3) end end) المشكلة ههي ان التكست الي بالبتون ماتجي تجي صورة فاضيية Link to comment
#DRAGON!FIRE Posted July 16, 2014 Share Posted July 16, 2014 متاكد من اسم ومسار الصورة ؟ Link to comment
^#Dream Posted July 16, 2014 Author Share Posted July 16, 2014 الصورهه تجي بس الـ Text الكلام الي بالزر مايطلع Link to comment
#DRAGON!FIRE Posted July 16, 2014 Share Posted July 16, 2014 كامل واستبدله بـ ذا guiCreateButton امسح فنكشن function guiCreateButton( x2, y2, width2, height2, titleBarText2, relative2, ksa ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Button.png", relative2, ksa ) local w, h = guiGetSize ( mainBackground, false ) local mainBackgroundLabel = guiCreateLabel ( x2, y2, w, h, titleBarText2, false, mainBackground ) guiSetFont ( mainBackgroundLabel, font ) guiSetEnabled ( mainBackgroundLabel, false ) guiLabelSetHorizontalAlign(mainBackgroundLabel, "center") guiLabelSetVerticalAlign(mainBackgroundLabel, "center") guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 ) end Link to comment
^#Dream Posted July 16, 2014 Author Share Posted July 16, 2014 كل شوي يطلع لي ايرور يقول عند end واروح احذفه يطلع لي خطاء ثاني Link to comment
#DRAGON!FIRE Posted July 16, 2014 Share Posted July 16, 2014 قلت لك احذفه كاممل .. واستبدله لانه ناقص عندك اند عطني سطر الخطا . Link to comment
Max+ Posted July 16, 2014 Share Posted July 16, 2014 (edited) addEventHandler ( 'onClientResourceStart', resourceRoot, function ( ) mainBackground = guiCreateStaticImage( 20, 200, 100, 100, "window.png", false ) Label = guiCreateLabel(0.02,0.04,0.94,0.92,"This is help text.",true,mainBackground) guiSetEnabled(Label, false) guiSetFont (Label, "default-normal") guiLabelSetHorizontalAlign(Label, "center") guiLabelSetVerticalAlign(Label, "center") guiLabelSetColor( Label, 255, 0, 0 ) end ) addEventHandler( "onClientMouseEnter", resourceRoot, function () if ( localPlayer == mainBackground ) then guiStaticImageLoadImage(mainBackground,"Button2.png") guiLabelSetColor(Label, 255, 0, 0) playSoundFrontEnd ( 3) end end ) Edited July 16, 2014 by Guest Link to comment
shwaeki Posted July 16, 2014 Share Posted July 16, 2014 (edited) addEventHandler ( 'onClientResourceStart', resourceRoot, function ( ) mainBackground = guiCreateStaticImage( 20, 200, 100, 100, "window.png", false ) Label = guiCreateLabel(0.02,0.04,0.94,0.92,"This is help text.",true,mainBackground) guiSetEnabled(Label, false) guiSetFont (Label, font ) guiLabelSetHorizontalAlign(Label, "center") guiLabelSetVerticalAlign(Label, "center") guiLabelSetColor( Label, 255, 0, 0 ) end ) addEventHandler( "onClientMouseEnter", resourceRoot, function () if ( localPlayer == mainBackground ) then guiStaticImageLoadImage(mainBackground,"Button2.png") guiLabelSetColor(Label, 255, 0, 0) playSoundFrontEnd ( 3) end end ) مين قالك هو بسوي هيك تفضل جرب function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) local mainBackground = guiCreateStaticImage(x2, y2, width2, height2, "window.png", relative2) local mainBackgroundLabel = guiCreateLabel(0, 0, 0, 0, titleBarText2, false, mainBackground) guiSetEnabled(mainBackgroundLabel, false) return mainBackground end function guiCreateButton( x2, y2, width2, height2, titleBarText2, relative2, ksa ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Button.png", relative2, ksa ) local w, h = guiGetSize ( mainBackground, false ) local mainBackgroundLabel = guiCreateLabel ( x2, y2, w, h, titleBarText2, false, mainBackground ) guiSetFont ( mainBackgroundLabel, font ) guiSetEnabled ( mainBackgroundLabel, false ) guiLabelSetHorizontalAlign(mainBackgroundLabel, "center") guiLabelSetVerticalAlign(mainBackgroundLabel, "center") guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 ) end addEventHandler( "onClientMouseEnter", root, function () if source == mainBackground then guiStaticImageLoadImage(mainBackground,"Button2.png") guiLabelSetColor(mainBackgroundLabel, 255, 0, 0) playSoundFrontEnd ( 3) end end) Edited July 16, 2014 by Guest Link to comment
Max+ Posted July 16, 2014 Share Posted July 16, 2014 addEventHandler ( 'onClientResourceStart', resourceRoot, function ( ) mainBackground = guiCreateStaticImage( 20, 200, 100, 100, "window.png", false ) Label = guiCreateLabel(0.02,0.04,0.94,0.92,"This is help text.",true,mainBackground) guiSetEnabled(Label, false) guiSetFont (Label, font ) guiLabelSetHorizontalAlign(Label, "center") guiLabelSetVerticalAlign(Label, "center") guiLabelSetColor( Label, 255, 0, 0 ) end ) addEventHandler( "onClientMouseEnter", resourceRoot, function () if ( localPlayer == mainBackground ) then guiStaticImageLoadImage(mainBackground,"Button2.png") guiLabelSetColor(Label, 255, 0, 0) playSoundFrontEnd ( 3) end end ) مين قالك خو بسوي هيك تفضل جرب function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) local mainBackground = guiCreateStaticImage(x2, y2, width2, height2, "window.png", relative2) local mainBackgroundLabel = guiCreateLabel(0, 0, 0, 0, titleBarText2, false, mainBackground) guiSetEnabled(mainBackgroundLabel, false) return mainBackground end function guiCreateButton( x2, y2, width2, height2, titleBarText2, relative2, ksa ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Button.png", relative2, ksa ) local w, h = guiGetSize ( mainBackground, false ) local mainBackgroundLabel = guiCreateLabel ( x2, y2, w, h, titleBarText2, false, mainBackground ) guiSetFont ( mainBackgroundLabel, font ) guiSetEnabled ( mainBackgroundLabel, false ) guiLabelSetHorizontalAlign(mainBackgroundLabel, "center") guiLabelSetVerticalAlign(mainBackgroundLabel, "center") guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 ) end addEventHandler( "onClientMouseEnter", root, function () if source == mainBackground then guiStaticImageLoadImage(mainBackground,"Button2.png") guiLabelSetColor(mainBackgroundLabel, 255, 0, 0) playSoundFrontEnd ( 3) end end) باراميتر الصورة المطلوب 6 ممن وين جبت ksa ? Link to comment
^#Dream Posted July 16, 2014 Author Share Posted July 16, 2014 الكود الي يغير صورة الزر جبته من سكربت عندي اي بارميتر ؟ Link to comment
Max+ Posted July 16, 2014 Share Posted July 16, 2014 الكود الي يغير صورة الزر جبته من سكربت عندياي بارميتر ؟ جرب الكود حقي استبدل x , y hight , width .. باللي عندك وبس Link to comment
^#Dream Posted July 16, 2014 Author Share Posted July 16, 2014 هذا كودي بدون اي تعديل نسيت احط onClientMouseLeave function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) local mainBackground = guiCreateStaticImage(x2, y2, width2, height2, "window.png", relative2) local mainBackgroundLabel = guiCreateLabel(0, 0, 0, 0, titleBarText2, false, mainBackground) guiSetEnabled(mainBackgroundLabel, false) return mainBackground end function guiCreateButton( x2, y2, width2, height2, titleBarText2, relative2, ksa ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Button.png", relative2, ksa ) local w, h = guiGetSize ( mainBackground, false ) local mainBackgroundLabel = guiCreateLabel ( x2, y2, w, h, titleBarText2, false, mainBackground ) guiSetFont ( mainBackgroundLabel, font ) guiSetEnabled ( mainBackgroundLabel, false ) guiLabelSetHorizontalAlign(mainBackgroundLabel, "center") guiLabelSetVerticalAlign(mainBackgroundLabel, "center") guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 ) end addEventHandler( "onClientMouseEnter", root, function () if source == mainBackground then guiStaticImageLoadImage(mainBackground,"Button2.png") guiLabelSetColor(mainBackgroundLabel, 255, 0, 0) playSoundFrontEnd ( 3) end end) addEventHandler( "onClientGUIClick", root, function () if source == mainBackground then playSoundFrontEnd ( 19) end end) addEventHandler( "onClientMouseLeave", root, function () if source == mainBackground then guiStaticImageLoadImage(mainBackground,"File/Button.png") guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 ) end end) return mainBackground الاكواد حقتكم كل شوي يطلع مشكلة عند end واحذفها ثم يقول خطاء عند النافذه Link to comment
Max+ Posted July 16, 2014 Share Posted July 16, 2014 (edited) addEventHandler ( 'onClientResourceStart', resourceRoot, function ( ) mainBackground = guiCreateStaticImage( 20, 200, 100, 100, "window.png", false ) local mainBackground2 = guiCreateStaticImage ( 20, 200, 100, 100, "Button.png", false) Label = guiCreateLabel(0.02,0.04,0.94,0.92,"This is help text.",true,mainBackground) guiSetEnabled(Label, false) guiSetFont (Label, "default-normal") guiLabelSetHorizontalAlign(Label, "center") guiLabelSetVerticalAlign(Label, "center") guiLabelSetColor( Label, 255, 0, 0 ) end ) addEventHandler( "onClientMouseEnter", resourceRoot, function () if ( localPlayer == mainBackground ) then guiStaticImageLoadImage(mainBackground,"Button2.png") guiLabelSetColor(Label, 255, 0, 0) playSoundFrontEnd ( 3) end end ) addEventHandler( "onClientGUIClick", resourceRoot, function ( ) if (localPlayer == mainBackground ) then playSoundFrontEnd ( 19) end end) addEventHandler( "onClientMouseLeave", resourceRoot, function ( ) if (localPlayer == mainBackground ) then guiStaticImageLoadImage(mainBackground,"File/Button.png") guiLabelSetColor( mainBackgroundLabel, 255, 0, 0 ) end end) تأكد الكود كلينت . . + اذا الصور كلها في مجلد اسمه File لازم كل الصور تسوي لهم File/'Button1' File/'Button2' ... الخ + ياليت تستخدم الديبق وتقول لي وش يطلع لك اخطاء من كودي . . Edited July 16, 2014 by Guest Link to comment
#DRAGON!FIRE Posted July 16, 2014 Share Posted July 16, 2014 سطر 42 احذفه @ Max : هريس -__- Link to comment
^#Dream Posted July 16, 2014 Author Share Posted July 16, 2014 شكلهه مهو زابط خلاصص ماعاد ابي اسويهه مششكورين Link to comment
Max+ Posted July 16, 2014 Share Posted July 16, 2014 شكلهه مهو زابط خلاصص ماعاد ابي اسويههمششكورين اضغط السكربت وارفعه على موقع مع الصور وانا بضبطه لك وبرسله لك لاني ماعرف كم تبي صور + الفائدة من المود ارسلي السكربت خاص اذا ماتقدر تحطه هنا Link to comment
Max+ Posted July 16, 2014 Share Posted July 16, 2014 سطر 42 احذفه@ Max : هريس -__- وليه هريس بالله ؟ وش الخطأ ماشوف فيه شي . . Link to comment
#DRAGON!FIRE Posted July 16, 2014 Share Posted July 16, 2014 if ( localPlayer == mainBackground ) then !!!! ؟ Link to comment
Max+ Posted July 16, 2014 Share Posted July 16, 2014 if ( localPlayer == mainBackground ) then !!!! ؟ طيب ذا اذا الاعب ضغط على الخلفيه ؟ وش فيه كانك مسوي if source == .. . Link to comment
TAPL Posted July 16, 2014 Share Posted July 16, 2014 if ( localPlayer == mainBackground ) then !!!! ؟ طيب ذا اذا الاعب ضغط على الخلفيه ؟ وش فيه كانك مسوي if source == .. . انت فاهم السورس خطأ كل حدث يفرق عن الثاني وراجع الويكي عشان تعرف ايش السورس لحدث معين هو الشي الي انضغط عليه و ليس الاعب الي ضغط على الشي onClientGUIClick السورس في الحدث و اصلاً ما يصير اساساً تقارن لاعب ب زر يعني يصير مثلاً تقارن ماكس == خلفية؟ انت خلفية؟ هههههه Link to comment
Max+ Posted July 16, 2014 Share Posted July 16, 2014 if ( localPlayer == mainBackground ) then !!!! ؟ طيب ذا اذا الاعب ضغط على الخلفيه ؟ وش فيه كانك مسوي if source == .. . انت فاهم السورس خطأ كل حدث يفرق عن الثاني وراجع الويكي عشان تعرف ايش السورس لحدث معين هو الشي الي انضغط عليه و ليس الاعب الي ضغط على الشي onClientGUIClick السورس في الحدث و اصلاً ما يصير اساساً تقارن لاعب ب زر يعني يصير مثلاً تقارن ماكس == خلفية؟ انت خلفية؟ هههههه اها , واضح الحين الله يعطيك العافية تبوله ماقصرت Link to comment
^#Dream Posted July 16, 2014 Author Share Posted July 16, 2014 ^ ارسلت لك السكربت خاصص 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