#STZ Posted September 23, 2016 Share Posted September 23, 2016 السلام عليكم و رحمة الله و بركاته اليوم سويت لوحة اختيار بين تيمين وسويت لوحة تفتح من اف 12 لو يبي يرجع اللي لوحة اختيار التيمات المهم يوم اضغط اف 12 يجي له صورتين لكل تيم صورة اضغط علي اي صورة منهم يغير التيم فعلا لاكن الماوس ظاهرة ما بتروح سويت الزرين كـــ زر اغلاق عشان الماوس ينخفي واللوحة لاكن الماوس ظاهر ايش الحل ؟ Link to comment
iPrestege Posted September 23, 2016 Share Posted September 23, 2016 اطرح الاكواد عشان نساعدك يعني انت معك مشكلة في الماوس اطرح الكلنت Link to comment
Abdul KariM Posted September 23, 2016 Share Posted September 23, 2016 كيف بنساعدك واكوادك ماهب مطروحه ؟؟ Link to comment
#STZ Posted September 23, 2016 Author Share Posted September 23, 2016 اطرحه كله ؟ 326 سطر لانه مود كبير جدا مع ان بيسرقون تعبي لاكن خذ ملف السيرفر هو الاساس و مب موجود addEventHandler("onClientGUIClick",root,function () if source == exit_game then guiSetVisible(chhose,true) guiSetVisible(exit_wnd,false) end end ) addEventHandler('onClientGUIClick', root, -- عندما يم الضغط على الازرار function ( ) -- فتح وظيفة جديده بدون اسم if ( source == cancel_exit ) then -- اذا الاعب ضغط على الزر Button guiSetVisible ( exit_wnd, false ) showCursor ( false ) end -- اغلاق end -- اغلاق ) -- اغلاق GUIEditor = { label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() exit_wnd = guiCreateWindow(383, 250, 401, 169, "Created By MR.NaiF Wzarh Q.6", false) guiWindowSetSizable(exit_wnd, false) guiSetAlpha(exit_wnd, 1.00) guiSetProperty(exit_wnd, "CaptionColour", "FFFA0000") guiSetVisible(exit_wnd,false) exit_game = guiCreateButton(32, 92, 165, 45, "Yes", false, exit_wnd) guiSetFont(exit_game, "default-bold-small") guiSetProperty(exit_game, "NormalTextColour", "FF35FE00") cancel_exit = guiCreateButton(207, 92, 165, 45, "No", false, exit_wnd) guiSetFont(cancel_exit, "default-bold-small") guiSetProperty(cancel_exit, "NormalTextColour", "FFFD0000") GUIEditor.label[3] = guiCreateLabel(123, 41, 372, 15, "هل تريد الخروج من اللعبة الحالية ؟", false, exit_wnd) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 241, 249, 0) guiLabelSetHorizontalAlign(GUIEditor.label[3], "left", true) end ) function OpenWin() if guiGetVisible ( exit_wnd ) then guiSetVisible ( exit_wnd, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( exit_wnd, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("z", "down", OpenWin)--الزر هنا addEventHandler("onClientGUIClick",root,function () if source == zm_btn then guiSetVisible(chsgng,true) guiSetVisible(chhose,false) end end ) addEventHandler("onClientMouseEnter", root, function() if source == azt then guiSetAlpha(source, 1) end end ) addEventHandler("onClientMouseLeave", root, function() if source == azt then guiSetAlpha(source, 0.4) end end ) addEventHandler("onClientMouseEnter", root, function() if source == grv then guiSetAlpha(source, 1) end end ) addEventHandler("onClientMouseLeave", root, function() if source == grv then guiSetAlpha(source, 0.4) end end ) addEventHandler("onClientResourceStart", resourceRoot, function() chsgng = guiCreateWindow(248, 150, 911, 466, "Please Choose A Team/Gang By MR.NaiF", false) guiWindowSetSizable(chsgng, false) guiSetVisible ( chsgng, false ) azt = guiCreateStaticImage(9, 19, 421, 437, "aztks.png", false, chsgng) grv = guiCreateStaticImage(467, 30, 435, 426, "grv.png", false, chsgng) end ) addEventHandler("onClientMouseEnter", root, function() if source == fr_btn then guiSetAlpha(source, 1) end end ) addEventHandler("onClientMouseLeave", root, function() if source == fr_btn then guiSetAlpha(source, 0.4) end end ) addEventHandler("onClientMouseEnter", root, function() if source == zm_btn then guiSetAlpha(source, 1) end end ) addEventHandler("onClientMouseLeave", root, function() if source == zm_btn then guiSetAlpha(source, 0.4) end end ) addEventHandler("onClientResourceStart", resourceRoot, function() chhose = guiCreateWindow(329, 167, 586, 272, "Wzarh Q.6 By MR.NaiF Have Fun", false) guiWindowSetSizable(chhose, false) guiSetAlpha(chhose, 1.00) guiSetProperty(chhose, "CaptionColour", "FF7DFE00") guiSetVisible ( chhose, false ) fr_btn = guiCreateStaticImage(11, 19, 563, 101, "1.png", false, chhose) zm_btn = guiCreateStaticImage(12, 121, 562, 100, "3.png", false, chhose) end ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(264,152,255,341,"Welcome!",false) guiSetAlpha(GUIEditor_Window[1],1) LoginUsername = guiCreateEdit(0.298,0.1701,0.6157,0.1026,"",true,GUIEditor_Window[1]) guiSetAlpha(LoginUsername,1) LoginPassword = guiCreateEdit(0.298,0.2815,0.6157,0.1026,"",true,GUIEditor_Window[1]) guiSetAlpha(LoginPassword,1) guiEditSetMasked ( LoginPassword, true ) GUIEditor_Label[2] = guiCreateLabel(0.0431,0.1906,0.2471,0.0616,"Username:",true,GUIEditor_Window[1]) guiSetAlpha(GUIEditor_Label[2],1) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(0.0471,0.2962,0.251,0.0704,"Password:",true,GUIEditor_Window[1]) guiSetAlpha(GUIEditor_Label[3],1) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Label[4] = guiCreateLabel(0.0745,0.5279,0.8314,0.0645,"If you are new, please register!",true,GUIEditor_Window[1]) guiSetAlpha(GUIEditor_Label[4],1) guiLabelSetColor(GUIEditor_Label[4],255,150,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) guiSetFont(GUIEditor_Label[4],"clear-normal") GUIEditor_Label[5] = guiCreateLabel(0.0784,0.0792,0.8314,0.0645,"Welcome! Please register or login!",true,GUIEditor_Window[1]) guiSetAlpha(GUIEditor_Label[5],1) guiLabelSetColor(GUIEditor_Label[5],255,150,255) guiLabelSetVerticalAlign(GUIEditor_Label[5],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[5],"left",false) guiSetFont(GUIEditor_Label[5],"clear-normal") GUIEditor_Button[1] = guiCreateButton(0.5216,0.4164,0.3961,0.0909,"Login!",true,GUIEditor_Window[1]) guiSetAlpha(GUIEditor_Button[1],1) EditRegisterUsername = guiCreateEdit(0.2902,0.5924,0.6157,0.1026,"",true,GUIEditor_Window[1]) guiSetAlpha(EditRegisterUsername,1) EditRegisterPassword = guiCreateEdit(0.2902,0.7038,0.6157,0.1026,"",true,GUIEditor_Window[1]) guiEditSetMasked ( EditRegisterPassword, true ) guiSetAlpha(EditRegisterPassword,1) GUIEditor_Label[6] = guiCreateLabel(0.0392,0.61,0.2471,0.0616,"Username:",true,GUIEditor_Window[1]) guiSetAlpha(GUIEditor_Label[6],1) guiLabelSetColor(GUIEditor_Label[6],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[6],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[6],"left",false) guiSetFont(GUIEditor_Label[6],"default-bold-small") GUIEditor_Label[7] = guiCreateLabel(0.0392,0.7185,0.251,0.0704,"Password:",true,GUIEditor_Window[1]) guiSetAlpha(GUIEditor_Label[7],1) guiLabelSetColor(GUIEditor_Label[7],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[7],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[7],"left",false) guiSetFont(GUIEditor_Label[7],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(0.5216,0.8328,0.3961,0.0909,"Register!",true,GUIEditor_Window[1]) guiSetAlpha(GUIEditor_Button[2],1) GUIEditor_Image[1] = guiCreateStaticImage(0.0549,0.7918,0.349,0.173,"img/mtalogo.png",true,GUIEditor_Window[1]) guiSetAlpha(GUIEditor_Image[1],1) guiSetVisible ( GUIEditor_Window[1], false ) local localPlayer = getLocalPlayer ( ) function windowHandler( ) local playername = getPlayerName(localPlayer) guiSetText(LoginUsername, "") guiSetText(EditRegisterUsername, "") guiSetText(LoginUsername, playername) guiSetText(EditRegisterUsername, playername) guiSetVisible ( GUIEditor_Window[1], true ) guiSetInputEnabled(true) showCursor ( true ) end function onClickBtn ( button, state ) if (source == GUIEditor_Button[1]) then triggerServerEvent ( "onLogin", getRootElement(), localPlayer, guiGetText(LoginUsername), guiGetText(LoginPassword) ) end end function onClickBtn2 ( button, state ) if (source == GUIEditor_Button[2]) then triggerServerEvent ( "onRegister", getRootElement(), localPlayer, guiGetText(EditRegisterUsername), guiGetText(EditRegisterPassword)) end end function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) guiSetVisible ( chhose, true ) showCursor ( true ) end addEvent( "hideLoginWindow", true ) addEventHandler( "hideLoginWindow", getRootElement(), hideLoginWindow ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), windowHandler ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], onClickBtn, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], onClickBtn2, false ) addEventHandler('onClientGUIClick', root, -- عندما يم الضغط على الازرار function ( ) -- فتح وظيفة جديده بدون اسم if ( source == azt ) then -- اذا الاعب ضغط على الزر Button guiSetVisible ( chsgng, false ) showCursor ( false ) triggerServerEvent('Aztecas', localPlayer) -- end -- اغلاق end -- اغلاق ) -- اغلاق addEventHandler('onClientGUIClick', root, -- عندما يم الضغط على الازرار function ( ) -- فتح وظيفة جديده بدون اسم if ( source == grv ) then -- اذا الاعب ضغط على الزر Button guiSetVisible ( chsgng, false ) showCursor ( false ) triggerServerEvent('Grove', localPlayer) -- end -- اغلاق end -- اغلاق ) -- اغلاق addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == azt ) then triggerServerEvent ( "GR", localPlayer ) -- اضافة اللاعب في التيم setElementHealth (localPlayer,100) setElementModel ( localPlayer, 114 ) outputChatBox('You Are Now Aztecas Team ', 255, 255, 255, true ) elseif ( source == grv ) then triggerServerEvent ( "BA", localPlayer ) setElementModel ( localPlayer, 107 ) setElementHealth (localPlayer,100) outputChatBox('You Are Now Grove Team ', 255, 255, 255, true ) end end ) addEventHandler('onClientGUIClick', root, -- عندما يم الضغط على الازرار function ( ) -- فتح وظيفة جديده بدون اسم if ( source == azt ) then -- اذا الاعب ضغط على الزر Button guiSetVisible ( chsgng, false ) showCursor ( false ) end -- اغلاق end -- اغلاق ) -- اغلاق addEventHandler('onClientGUIClick', root, -- عندما يم الضغط على الازرار function ( ) -- فتح وظيفة جديده بدون اسم if ( source == grv ) then -- اذا الاعب ضغط على الزر Button guiSetVisible ( chsgng, false ) showCursor ( false ) end -- اغلاق end -- اغلاق ) -- اغلاق Link to comment
</Mr.Tn6eL> Posted September 23, 2016 Share Posted September 23, 2016 guiSetInputEnabled المشكلة في 2 Link to comment
Abdul KariM Posted September 23, 2016 Share Posted September 23, 2016 زي ماقال اخونا تنطيل واختصر اكوادك عن طريق elseif تختصر لك الكثير 1 Link to comment
iPrestege Posted September 23, 2016 Share Posted September 23, 2016 بالنسبة لـ السطور من 289 لـ 304 الوظيفة هذي في الحدث هذا setElementModel setElementHealth هذي كلها كلاينت يعني وهمية للاعب فقط وكودك حوسة ترتيب الاكواد يسهل عليك البرمجة بكثير وللي بيساعدك بالكود 2 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