iPrestege Posted March 16, 2013 Share Posted March 16, 2013 function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Back1.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) guiSetVisible (GUIEditor_Window[1], false) guiSetVisible (GUIEditor_Window[2], false) Background = guiCreateButton(255,70,90,30,"Background",false,GUIEditor_Window[1]) local load = false addEventHandler ( "onClientGUIClick", root, function ( ) if source == Background then guiStaticImageLoadImage(mainBackground,load and "Back1.png" or "Back2.png") load = not load end end ) جربةة Link to comment
فاّرس Posted March 16, 2013 Author Share Posted March 16, 2013 function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Back1.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) guiSetVisible (GUIEditor_Window[1], false) guiSetVisible (GUIEditor_Window[2], false) Background = guiCreateButton(255,70,90,30,"Background",false,GUIEditor_Window[1]) local load = false addEventHandler ( "onClientGUIClick", root, function ( ) if source == Background then guiStaticImageLoadImage(mainBackground,load and "Back1.png" or "Back2.png") load = not load end end ) جربةة اذا حذفت GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) يشتغل واذا حطيتها يصير بس يغير النافذه 2 والاولى ما تتغير Link to comment
iPrestege Posted March 16, 2013 Share Posted March 16, 2013 لا المفروض يشتغل ذذ لانة الفنكشن يرجع للوظيفة كاملة حق انشاء النافذهـ [= Link to comment
فاّرس Posted March 16, 2013 Author Share Posted March 16, 2013 لا المفروض يشتغل ذذ لانة الفنكشن يرجع للوظيفة كاملة حق انشاء النافذهـ [= جربه بنفسك! Link to comment
iPrestege Posted March 16, 2013 Share Posted March 16, 2013 تقريبا لان الزر للنافذهـ نفسها حق الـاولى =============================== جرب # local load = false function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) mainBackground = guiCreateStaticImage ( x2, y2, width2, height2,not load and "Back1.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) setElementID( mainBackground, "gui") return mainBackground end GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) guiSetVisible (GUIEditor_Window[1], false) guiSetVisible (GUIEditor_Window[2], false) Background = guiCreateButton(255,70,90,30,"Background",false,GUIEditor_Window[1]) addEventHandler ( "onClientGUIClick", root, function ( ) if source == Background then guiStaticImageLoadImage(getElementByID("gui"),load and "Back1.png" or "Back2.png") load = not load end end ) Link to comment
فاّرس Posted March 16, 2013 Author Share Posted March 16, 2013 تقريبا لان الزر للنافذهـ نفسها حق الـاولى =============================== جرب # local load = false function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) mainBackground = guiCreateStaticImage ( x2, y2, width2, height2,not load and "Back1.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) setElementID( mainBackground, "gui") return mainBackground end GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) guiSetVisible (GUIEditor_Window[1], false) guiSetVisible (GUIEditor_Window[2], false) Background = guiCreateButton(255,70,90,30,"Background",false,GUIEditor_Window[1]) addEventHandler ( "onClientGUIClick", root, function ( ) if source == Background then guiStaticImageLoadImage(getElementByID("gui"),load and "Back1.png" or "Back2.png") load = not load end end ) العكس ^^ صارت النافذه الاولى تتغير والثانيه لآ Link to comment
iPrestege Posted March 16, 2013 Share Posted March 16, 2013 local load = false function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2,not load and "Back1.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) Background = guiCreateButton(300,10,90,30,"Background",false,GUIEditor_Window[1]) addEventHandler ( "onClientGUIClick", root, function ( ) if source == Background then for i = 1, 2 do guiStaticImageLoadImage(GUIEditor_Window[i],load and "Back1.png" or "Back2.png") end load = not load end end ) Link to comment
فاّرس Posted March 16, 2013 Author Share Posted March 16, 2013 local load = false function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2,not load and "Back1.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) Background = guiCreateButton(300,10,90,30,"Background",false,GUIEditor_Window[1]) addEventHandler ( "onClientGUIClick", root, function ( ) if source == Background then for i = 1, 2 do guiStaticImageLoadImage(GUIEditor_Window[i],load and "Back1.png" or "Back2.png") end load = not load end end ) ضبطت يعطيك العافييهه لو عندي اكثر من نافذه اسويها كذا : local load = false function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2,not load and "Back1.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(234,59,377,374,"",false) GUIEditor_Window[2] = guiCreateWindow(234,59,377,254,"",false) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) Background = guiCreateButton(300,10,90,30,"Background",false,GUIEditor_Window[1]) addEventHandler ( "onClientGUIClick", root, function ( ) if source == Background then for i = 1, 2, 3 do guiStaticImageLoadImage(GUIEditor_Window[i],load and "Back1.png" or "Back2.png") end load = not load end end ) التغيير هنا for i = 1, 2, 3 do Link to comment
iPrestege Posted March 16, 2013 Share Posted March 16, 2013 لا لازم تكون النافذهـ اسمها كذا GUIEditor_Window[num] for i = 1,3 do ================== اللهه يعافيكك ذذ Link to comment
فاّرس Posted March 18, 2013 Author Share Posted March 18, 2013 (edited) بعد التعقيد ابي افهم شيء وآحد ,, function teamName ( source, key, newTeamName ) local playerTeam = getPlayerTeam ( source ) -- get the player's team if ( playerTeam ) then -- if he's on a team local oldTeamName = getTeamName ( playerTeam ) -- get the team's current name setTeamName ( playerTeam, newTeamName ) -- change its name outputChatBox ( "Changed " .. getPlayerName ( source ).."'s team name from " .. oldTeamName .. " to " .. newTeamName ) else outputChatBox ( getPlayerName ( source ) .. " isn't on a team" ) end end addCommandHandler ( "teamname", teamName ) الزبدة الي آخذها من ذآ الكود وينهآ !؟ Edit : aboShanb @ اضهار اسم التيم,, Edited March 18, 2013 by Guest Link to comment
AboShanab Posted March 18, 2013 Share Posted March 18, 2013 بعد التعقيد ابي افهم شيء وآحد ,, function teamName ( source, key, newTeamName ) local playerTeam = getPlayerTeam ( source ) -- get the player's team if ( playerTeam ) then -- if he's on a team local oldTeamName = getTeamName ( playerTeam ) -- get the team's current name setTeamName ( playerTeam, newTeamName ) -- change its name outputChatBox ( "Changed " .. getPlayerName ( source ).."'s team name from " .. oldTeamName .. " to " .. newTeamName ) else outputChatBox ( getPlayerName ( source ) .. " isn't on a team" ) end end addCommandHandler ( "teamname", teamName ) الزبدة الي آخذها من ذآ الكود وينهآ !؟ انت قصصدكك من ذا الكود وش تبي تاخذ منه .. اضهار اسم التيم ولا تغيير التيم ولا شنو ؟ 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