momar5600 Posted September 11, 2016 Share Posted September 11, 2016 انا اخذت اكواد مستر جراند وسويت لوحة بس طلعت اخطاء كثيرة ودي بق يقول مافي ولا خطا انا لوحة زي قلتها اضغط علي تسجيل كاني مش بضغط عليها كلنت function onEnter( ) if ( source == loginacc ) then guiSetProperty(loginacc23, "ImageColours", "tl:FFFC0000 tr:FFFC0000 bl:FFFC0000 br:FFFC0000") elseif ( source ~= loginacc ) then guiSetProperty(loginacc23, "ImageColours", "tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000") end end addEventHandler("onClientMouseEnter",root,onEnter) -------------------------------------------------- function onEnter( ) if ( source == registeracc ) then guiSetProperty(registeracc2, "ImageColours", "tl:FFFC0000 tr:FFFC0000 bl:FFFC0000 br:FFFC0000") elseif ( source ~= registeracc ) then guiSetProperty(registeracc2, "ImageColours", "tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000") end end addEventHandler("onClientMouseEnter",root,onEnter) -------------------------------------------------- function onEnter( ) if ( source == gotowindo22 ) then guiSetProperty(gotowindo2, "ImageColours", "tl:FFFC0000 tr:FFFC0000 bl:FFFC0000 br:FFFC0000") elseif ( source ~= gotowindo22 ) then guiSetProperty(gotowindo2, "ImageColours", "tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000") end end addEventHandler("onClientMouseEnter",root,onEnter) addEventHandler("onClientMouseEnter",root,onEnter) -------------------------------------------------- function onEnter( ) if ( source == forgerpass ) then guiSetProperty(forgetpass2, "ImageColours", "tl:FFFC0000 tr:FFFC0000 bl:FFFC0000 br:FFFC0000") elseif ( source ~= forgerpass ) then guiSetProperty(forgetpass2, "ImageColours", "tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000") end end addEventHandler("onClientMouseEnter",root,onEnter) function onEnter( ) if ( source == rrgisterr ) then guiSetProperty(rrgisterr2, "ImageColours", "tl:FFFC0000 tr:FFFC0000 bl:FFFC0000 br:FFFC0000") elseif ( source ~= rrgisterr ) then guiSetProperty(rrgisterr2, "ImageColours", "tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000") end end addEventHandler("onClientMouseEnter",root,onEnter) -------------------------------------------------------------------- SequrityQuestions = { 'What is the city where I was born ?', 'What\'s the name of your grandfather', 'What was the name of your first school'} GUIEditor = { checkbox = {}, progressbar = {}, edit = {}, button = {}, window = {}, label = {}, combobox = {} } local screenW, screenH = guiGetScreenSize() wndwo = guiCreateStaticImage( 0, 0, 1920, 1200, "login/background.png", false ) logaccWind = guiCreateStaticImage((664 - 316) / 2, (532 - 375) / 2, 316, 375, "login/img.png", false, wndwo) log1w = guiCreateStaticImage(0, 0, 316, 47, "login/login.png", false, logaccWind) log1wla = guiCreateLabel(0, 0, 316, 47, "سيرفر عشاق الوناسة", false, log1w) guiSetFont(log1wla, FontLabel2 ) guiLabelSetHorizontalAlign(log1wla, "center", false) guiLabelSetVerticalAlign(log1wla, "center") log2wlaen = guiCreateStaticImage(0, 47, 316, 7, "login/register2.png", false, logaccWind) logicepn = guiCreateStaticImage(19, 64, 33, 46, "login/login-ico.png", false, logaccWind) logicepn2 = guiCreateStaticImage(19, 125, 33, 44, "login/lock-ico.png", false, logaccWind) user = guiCreateEdit(62, 74, 217, 30, "", false, logaccWind) pas = guiCreateEdit(62, 128, 217, 31, "", false, logaccWind) guiEditSetMasked(pas, true) savac = guiCreateCheckBox(29, 179, 138, 31, "حفظ حسابي", false, false, logaccWind) guiSetFont(savac, FontLabel2 ) rrgisterr2 = guiCreateStaticImage(19, 220, 126, 39, "login/register2.png", false, logaccWind) loginacc23 = guiCreateStaticImage(167, 220, 126, 39, "login/register2.png", false, logaccWind) loginacc = guiCreateLabel((126 - 126) / 2, (39 - 39) / 2, 126, 39, "تسجيل دخول", false, loginacc23) guiLabelSetHorizontalAlign(loginacc, "center", false) guiLabelSetVerticalAlign(loginacc, "center") guiSetFont(loginacc, FontLabel2 ) rrgisterr = guiCreateLabel(0, 0, 126, 38, "انشاء حساب", false, rrgisterr2) guiSetFont(rrgisterr, FontLabel2 ) guiLabelSetHorizontalAlign(rrgisterr, "center", false) guiLabelSetVerticalAlign(rrgisterr, "center") addEventHandler('onClientGUIClick',root, function() if source == rrgisterr then -- هنا يتحقق بأن الشيء اللي نبي الحدث يتطبق عليه هو الزر حق فتح لوحة رقم 2 guiSetVisible(logaccWind,false) showCursor(false) -- هنا يفتح لنا اللوحة guiSetVisible(regiWind1,true) showCursor(true) end -- نهاية end -- .. ) gotowindo2 = guiCreateStaticImage(93, 269, 126, 39, "login/register2.png", false, logaccWind) forgetpass2 = guiCreateStaticImage(196, 320, 120, 40, "login/register2.png", false, logaccWind) forgerpass = guiCreateLabel(0, 0, 120, 40, "نسيان كلمة سر", false, forgetpass2) guiSetFont(forgerpass, FontLabel2 ) guiLabelSetHorizontalAlign(forgerpass, "center", false) guiLabelSetVerticalAlign(forgerpass, "center") forgetpassla = guiCreateLabel(0, 320, 196, 40, "هل نسيت كلمة مرور خاص بحسابك؟", false, logaccWind) guiLabelSetHorizontalAlign(forgetpassla, "center", false) guiLabelSetVerticalAlign(forgetpassla, "center") gotowindo22 = guiCreateLabel(0, 0, 126, 38, "العودة للرئيسية", false, gotowindo2) guiSetFont(gotowindo22, FontLabel2 ) guiLabelSetHorizontalAlign(gotowindo22, "center", false) guiLabelSetVerticalAlign(gotowindo22, "center") ------------------------------- لوحة انشاء حساب -------------------------- regiWind1 = guiCreateStaticImage((581 - 319) / 2, (544 - 398) / 2, 319, 398, "login/img.png", false, wndwo) log1w = guiCreateStaticImage(0, 0, 319, 47, "login/login.png", false, regiWind1) log1wla2 = guiCreateLabel(0, 0, 319, 47, "سيرفر عشاق الوناسة", false, log1w) guiSetFont(log1wla2, FontLabel2 ) guiLabelSetHorizontalAlign(log1wla2, "center", false) guiLabelSetVerticalAlign(log1wla2, "center") regiWind12 = guiCreateStaticImage(0, 47, 319, 7, "login/register2.png", false, regiWind1) logicepn2 = guiCreateStaticImage(19, 64, 33, 46, "login/login-ico.png", false, regiWind1) logicepn22 = guiCreateStaticImage(19, 125, 33, 44, "login/lock-ico.png", false, regiWind1) user1 = guiCreateEdit(62, 74, 217, 30, "", false, regiWind1) pas1 = guiCreateEdit(62, 128, 217, 31, "", false, regiWind1) registeracc2 = guiCreateStaticImage(20, 349, 126, 39, "login/register2.png", false, regiWind1) registeracc = guiCreateLabel(0, 0, 126, 39, "انشاء حساب", false, registeracc2) guiLabelSetHorizontalAlign(registeracc, "center", false) guiLabelSetVerticalAlign(registeracc, "center") gotowindo21 = guiCreateStaticImage(170, 349, 127, 39, "login/register2.png", false, regiWind1) gotowindo221 = guiCreateLabel(0, 0, 127, 39, "العودة للرئيسية", false, gotowindo21) guiLabelSetHorizontalAlign(gotowindo221, "center", false) guiLabelSetVerticalAlign(gotowindo221, "center") pas12 = guiCreateEdit(62, 184, 217, 31, "", false, regiWind1) logicepn23 = guiCreateStaticImage(18, 179, 33, 44, "login/lock-ico.png", false, regiWind1) combobo = guiCreateComboBox(81, 236, 228, 105, "", false, regiWind1) scmsaamd = guiCreateLabel(1, 233, 80, 29, "سوال الامن ", false, regiWind1) guiLabelSetHorizontalAlign(scmsaamd, "center", false) guiLabelSetVerticalAlign(scmsaamd, "center") scmsaamd2 = guiCreateLabel(1, 292, 80, 29, "الجواب", false, regiWind1) guiLabelSetHorizontalAlign(scmsaamd2, "center", false) guiLabelSetVerticalAlign(scmsaamd2, "center") scmsaamd3 = guiCreateEdit(81, 292, 147, 29, "", false, regiWind1) -----------------------------------لوحة استعادة كلمة مرور--------------------------- RecoveryPanel = guiCreateStaticImage((314 - 356) / 2, (387 - 576) / 2, 356, 576, "login/img.png", false, wndwo) log1w222 = guiCreateStaticImage(0, 0, 353, 47, "login/login.png", false, RecoveryPanel) log1w55 = guiCreateLabel(0, 0, 353, 47, "سيرفر عشاق الوناسة", false, log1w222) guiSetFont(log1w55, FontLabel2 ) guiLabelSetHorizontalAlign(log1w55, "center", false) guiLabelSetVerticalAlign(log1w55, "center") GUIEditor.staticimage[1] = guiCreateStaticImage(0, 47, 353, 6, "login/register2.png", false, RecoveryPanel) logicepn = guiCreateStaticImage(18, 95, 33, 36, "login/login-ico.png", false, RecoveryPanel) logicepn2 = guiCreateStaticImage(11, 467, 25, 35, "login/lock-ico.png", false, RecoveryPanel) AccountName_Edit_RecoveryPanel = guiCreateEdit(58, 98, 262, 27, "", false, RecoveryPanel) NewPass_Edit_RecoveryPanel = guiCreateEdit(43, 429, 217, 31, "", false, RecoveryPanel) ResetPassword_Button_RecoveryPanel2 = guiCreateStaticImage(111, 331, 126, 39, "login/register2.png", false, RecoveryPanel) ResetPassword_Button_RecoveryPanel = guiCreateLabel(0, 0, 126, 39, "إعادة تعيين كلمة المرور", false, ResetPassword_Button_RecoveryPanel2) guiLabelSetHorizontalAlign(ResetPassword_Button_RecoveryPanel, "center", false) guiSetFont(ResetPassword_Button_RecoveryPanel, FontLabel222 ) guiLabelSetVerticalAlign(ResetPassword_Button_RecoveryPanel, "center") ChangePassword_Button_RecoveryPanel2 = guiCreateStaticImage(26, 520, 149, 42, "login/register2.png", false, RecoveryPanel) ChangePassword_Button_RecoveryPanel = guiCreateLabel(0, 0, 149, 42, "تغيير كلمة السر", false, ChangePassword_Button_RecoveryPanel2) guiLabelSetHorizontalAlign(ChangePassword_Button_RecoveryPanel, "center", false) guiSetFont(ChangePassword_Button_RecoveryPanel, FontLabel2 ) guiLabelSetVerticalAlign(ChangePassword_Button_RecoveryPanel, "center") RePass_Edit_RecoveryPanel = guiCreateEdit(43, 471, 217, 31, "", false, RecoveryPanel) GUIEditor.staticimage[2] = guiCreateStaticImage(8, 426, 28, 34, "login/lock-ico.png", false, RecoveryPanel) SecurityQuestion_Label_RecoveryPanel = guiCreateLabel(1, 243, 121, 34, " سؤال الامان :", false, RecoveryPanel) guiLabelSetHorizontalAlign(SecurityQuestion_Label_RecoveryPanel, "center", false) guiSetFont(SecurityQuestion_Label_RecoveryPanel, FontLabel2 ) guiLabelSetVerticalAlign(SecurityQuestion_Label_RecoveryPanel, "center") Answer_Label_RecoveryPanel = guiCreateLabel(1, 282, 86, 35, "إجابة", false, RecoveryPanel) guiSetFont(Answer_Label_RecoveryPanel, FontLabel2 ) guiLabelSetHorizontalAlign(Answer_Label_RecoveryPanel, "center", false) guiLabelSetVerticalAlign(Answer_Label_RecoveryPanel, "center") QuestionAnswer_Edit_RecoveryPanel = guiCreateEdit(97, 287, 186, 26, "", false, RecoveryPanel) LINE1_RecoveryPanel = guiCreateLabel(0, 182, 353, 18, "ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ", false, RecoveryPanel) guiLabelSetHorizontalAlign(LINE1_RecoveryPanel, "center", false) guiLabelSetVerticalAlign(LINE1_RecoveryPanel, "center") FindAccount_Button_RecoveryPanel2 = guiCreateStaticImage(94, 135, 169, 42, "login/register2.png", false, RecoveryPanel) FindAccount_Button_RecoveryPanel = guiCreateLabel(0, 0, 169, 42, "تحقق", false, FindAccount_Button_RecoveryPanel2) guiLabelSetHorizontalAlign(FindAccount_Button_RecoveryPanel, "center", false) guiSetFont(FindAccount_Button_RecoveryPanel, FontLabel2 ) guiLabelSetVerticalAlign(FindAccount_Button_RecoveryPanel, "center") SearchName_Note_RecoveryPanel = guiCreateLabel(67, 57, 160, 33, "تحقق من حسابك", false, RecoveryPanel) guiLabelSetHorizontalAlign(SearchName_Note_RecoveryPanel, "center", false) guiSetFont(SearchName_Note_RecoveryPanel, FontLabel2 ) guiLabelSetVerticalAlign(SearchName_Note_RecoveryPanel, "center") AnswerQuestion_Note_RecoveryPanel = guiCreateLabel(1, 200, 218, 43, " الإجابة على سؤال الأمان : ", false, RecoveryPanel) guiLabelSetHorizontalAlign(AnswerQuestion_Note_RecoveryPanel, "center", false) guiSetFont(AnswerQuestion_Note_RecoveryPanel, FontLabel2 ) guiLabelSetVerticalAlign(AnswerQuestion_Note_RecoveryPanel, "center") SecurityQuestion_Value_RecoveryPanel = guiCreateLabel(122, 243, 212, 34, " سؤال الامان :", false, RecoveryPanel) guiLabelSetHorizontalAlign(SecurityQuestion_Value_RecoveryPanel, "center", false) guiSetFont(SecurityQuestion_Value_RecoveryPanel, FontLabel2 ) guiLabelSetVerticalAlign(SecurityQuestion_Value_RecoveryPanel, "center") GUIEditor.label[1] = guiCreateLabel(0, 370, 353, 18, "ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ", false, RecoveryPanel) ReturnMenu_Button_RecoveryPanel2 = guiCreateStaticImage(189, 520, 149, 42, "login/register2.png", false, RecoveryPanel) ReturnMenu_Button_RecoveryPanel = guiCreateLabel(0, 0, 149, 41, "رجوع للوحة تسجيل", false, ReturnMenu_Button_RecoveryPanel2) guiLabelSetHorizontalAlign(ReturnMenu_Button_RecoveryPanel, "center", false) guiSetFont(ReturnMenu_Button_RecoveryPanel, FontLabel2 ) guiLabelSetVerticalAlign(ReturnMenu_Button_RecoveryPanel, "center") GUIEditor.label[2] = guiCreateLabel(0, 558, 356, 14, "ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ", false, RecoveryPanel) guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[2], "center") NewPass_Label_RecoveryPanel = guiCreateLabel(260, 429, 88, 31, "كلمة سر جديدة", false, RecoveryPanel) guiSetFont(NewPass_Label_RecoveryPanel, FontLabel222 ) guiLabelSetHorizontalAlign(NewPass_Label_RecoveryPanel, "center", false) guiLabelSetVerticalAlign(NewPass_Label_RecoveryPanel, "center") RePass_Label_RecoveryPanel = guiCreateLabel(260, 471, 88, 31, "اعادة كتابة كلمة", false, RecoveryPanel) guiLabelSetHorizontalAlign(RePass_Label_RecoveryPanel, "center", false) guiSetFont(RePass_Label_RecoveryPanel, FontLabel222 ) guiLabelSetVerticalAlign(RePass_Label_RecoveryPanel, "center") ResetPassword_Note_RecoveryPanel = guiCreateLabel(1, 386, 220, 37, "إعادة تعيين كلمة المرور الخاصة بك :", false, RecoveryPanel) guiLabelSetHorizontalAlign(ResetPassword_Note_RecoveryPanel, "center", false) guiSetFont(ResetPassword_Note_RecoveryPanel, FontLabel2 ) guiLabelSetVerticalAlign(ResetPassword_Note_RecoveryPanel, "center") ------------------------------------------------------------------------------------ centerWindow(wndwo) centerWindow(logaccWind) centerWindow(regiWind1) centerWindow(RecoveryPanel) ---------------------- هنا صور كلمة سر خطا او صح ----------------------- addEvent("loginS",true) addEventHandler("loginS",root, function () guiSetVisible(loginS, true) setTimer(function() guiSetVisible(loginS, false) end,3000,1) end ) addEvent("regS",true) addEventHandler("regS",root, function () guiSetVisible(regS, true) setTimer(function() guiSetVisible(regS, false) end,3000,1) end ) addEvent("error",true) addEventHandler("error",root, function () guiSetVisible(error, true) setTimer(function() guiSetVisible(error, false) end,3000,1) end ) addEvent("error2",true) addEventHandler("error2",root, function () guiSetVisible(error2, true) setTimer(function() guiSetVisible(error2, false) end,3000,1) end ) local x4,y4 = guiGetScreenSize() x4 = x4 - 200 y4 = y4 - 30 loginS = guiCreateStaticImage(x4/2, y4, 200, 30, "images/loginS.png", false) guiSetVisible(loginS, false) regS = guiCreateStaticImage(x4/2, y4, 200, 30, "images/regS.png", false) guiSetVisible(regS, false) warning = guiCreateStaticImage(x4/2, y4, 200, 30, "images/warning.png", false, wndwo) guiSetVisible(warning, false) warning2 = guiCreateStaticImage(x4/2, y4, 200, 30, "images/warning2.png", false, wndwo) guiSetVisible(warning2, false) error = guiCreateStaticImage(x4/2, y4, 200, 30, "images/error.png", false, wndwo) guiSetVisible(error, false) error2 = guiCreateStaticImage(x4/2, y4, 200, 30, "images/error2.png", false, wndwo) guiSetVisible(error2, false) ------------------------------------------------------------------------------------ -- #Disabeld buttons $Events addEvent( 'LoginButtonDisable', true ) addEventHandler( 'LoginButtonDisable', root, function() guiSetEnabled(loginacc, false) guiSetEnabled(savac, false) guiEditSetReadOnly(user, true) guiEditSetReadOnly(pas, true) end ) addEvent( 'RegisterButtonDisable', true ) addEventHandler( 'RegisterButtonDisable', root, function() guiSetEnabled(registeracc, false) setTimer( guiSetEnabled, 5000, 1, registeracc, true ) guiSetEnabled(combobo, false) setTimer( guiSetEnabled, 5000, 1, combobo, true ) guiEditSetReadOnly(user1, true) guiEditSetReadOnly(pas1, true) guiEditSetReadOnly(pas12, true) guiEditSetReadOnly(scmsaamd3, true) setTimer( guiEditSetReadOnly, 5000, 1, user1, false ) setTimer( guiEditSetReadOnly, 5000, 1, pas1, false ) setTimer( guiEditSetReadOnly, 5000, 1, pas12, false ) setTimer( guiEditSetReadOnly, 5000, 1, scmsaamd3, false ) end ) addEvent( 'checkAccountButtonDisable', true ) addEventHandler( 'checkAccountButtonDisable', root, function() guiSetEnabled(FindAccount_Button_RecoveryPanel, false) setTimer( guiSetEnabled, 5000, 1, FindAccount_Button_RecoveryPanel, true ) end ) addEvent( 'DisableResetButtonDisable', true ) addEventHandler( 'DisableResetButtonDisable', root, function() guiSetEnabled(ResetPassword_Button_RecoveryPanel, false) setTimer( guiSetEnabled, 5000, 1, ResetPassword_Button_RecoveryPanel, true ) end ) addEvent( 'DisableChangeButtonDisable', true ) addEventHandler( 'DisableChangeButtonDisable', root, function() guiSetEnabled(ChangePassword_Button_RecoveryPanel, false) setTimer( guiSetEnabled, 5000, 1, ChangePassword_Button_RecoveryPanel, true ) end ) -- # Script $Functions function ClickButtons() if (source == loginacc) then local accName = guiGetText(user) local accPass = guiGetText(pas) local Remember = guiCheckBoxGetSelected(savac) if (accName == '' and accPass == '') then outputChatBox( '$Error :#FFFFFF write correct Username or Password .!', 255, 0, 0, true ) return end if (guiCheckBoxGetSelected(savac) == true) then rememberMe = 'true' else rememberMe = 'false' end triggerServerEvent( 'LoginToSystem', Cplayer, rememberMe, accName, accPass ) elseif (source == registeracc) then if (guiGetEnabled(loginacc) == false) then outputChatBox( '$Error :#FFFFFF You are already logged in .!', 255, 0, 0, true ) return end local newAccount = guiGetText(user1) local newPassword = guiGetText(pas1) local passwordmatch = guiGetText(pas12) local selectedQuestion = guiComboBoxGetSelected(combobo) if (selectedQuestion == -1) then outputChatBox( '$Error :#FFFFFF We don\'t know security question .!', 255, 0, 0, true ) return end local securityQuestion = guiComboBoxGetItemText(combobo, selectedQuestion) local answerValue = guiGetText(scmsaamd3) if (newAccount == "" or newPassord == "" or passwordmatch == "") then outputChatBox( '$Error : write correct Username or Password .!', 255, 0, 0, true ) return end if (newPassword ~= passwordmatch) then outputChatBox( '$Error :#FFFFFF Password not match .!', 255, 0, 0, true ) return end if (answerValue == "") then outputChatBox( '$Error :#FFFFFF write answer .!', 255, 0, 0, true ) return end triggerServerEvent( 'RegisterNewAccount', Cplayer, newAccount, newPassword, securityQuestion, answerValue ) guiSetText(user1, "") guiSetText(pas1, "") guiSetText(pas12, "") guiSetText(scmsaamd3, "") guiSetText(user, newAccount) guiSetText(pas, newPassword) guiComboBoxSetSelected(combobo, -1) elseif (source == forgerpass) then triggerServerEvent( 'checkPlayerLoginStatus', Cplayer ) elseif (source == ReturnMenu_Button_RecoveryPanel) then guiSetVisible(RecoveryPanel, false) guiSetVisible(logaccWind, true) elseif (source == FindAccount_Button_RecoveryPanel) then local account = guiGetText(AccountName_Edit_RecoveryPanel) if (account == "") then outputChatBox( '$Error :#FFFFFF write correct account name .!', 255, 0, 0, true ) return end triggerServerEvent( 'checkAccountForRecovery', Cplayer, account ) elseif (source == ResetPassword_Button_RecoveryPanel) then local accountName = guiGetText(AccountName_Edit_RecoveryPanel) local AnswerValue = guiGetText(QuestionAnswer_Edit_RecoveryPanel) if (AnswerValue == "") then outputChatBox( '$Error :#FFFFFF write answer first .!', 255, 0, 0, true ) return end triggerServerEvent( 'checkAnswerForRecovery', Cplayer, accountName, AnswerValue ) elseif (source == ChangePassword_Button_RecoveryPanel) then local newPass = guiGetText(NewPass_Edit_RecoveryPanel ) local rePass = guiGetText(RePass_Edit_RecoveryPanel) if (newPass == "" and rePass == "") then outputChatBox( '$Error :#FFFFFF write correct password .!', 255, 0, 0, true ) return end if (newPass ~= rePass) then outputChatBox( '$Error :#FFFFFF password not match .!', 255, 0, 0, true ) return end local accountName = guiGetText(AccountName_Edit_RecoveryPanel) triggerServerEvent( 'resetAccountPasswordForPlayer', Cplayer, accountName, newPass ) elseif (source == GUIEditor.button[3]) then triggerServerEvent( 'checkPlayerForGO', Cplayer ) end end addEventHandler( 'onClientGUIClick', root, ClickButtons ) addEvent( 'createEffectForEnter', true ) addEventHandler( 'createEffectForEnter', root, function() guiSetVisible(GUIEditor.progressbar[1], true) guiSetVisible(GUIEditor.label[15], true) progressTimer = setTimer(function() local LoadingProgress = guiProgressBarGetProgress(GUIEditor.progressbar[1]) guiProgressBarSetProgress(GUIEditor.progressbar[1], LoadingProgress + math.random(3, 10)) if (guiProgressBarGetProgress(GUIEditor.progressbar[1]) == 100) then guiSetVisible(logaccWind, false) showCursor(false) killTimer(progressTimer) guiProgressBarSetProgress(GUIEditor.progressbar[1], 0) fadeCamera(true) end end, 300, 0) end ) addEvent( 'showPasswordResetSection', true ) addEventHandler( 'showPasswordResetSection', root, function() guiSetVisible(ResetPassword_Button_RecoveryPanel, true) guiSetVisible(ResetPassword_Note_RecoveryPanel, true) guiSetVisible(NewPass_Label_RecoveryPanel, true) guiSetVisible(RePass_Label_RecoveryPanel, true) guiSetVisible(NewPass_Edit_RecoveryPanel, true) guiSetVisible(RePass_Edit_RecoveryPanel, true) guiSetVisible(ChangePassword_Button_RecoveryPanel, true) end ) addEvent( 'setTextForSecurityQuestion', true ) addEventHandler( 'setTextForSecurityQuestion', root, function(securityQuestion) if (guiGetVisible(RecoveryPanel) == true) then guiSetText(SecurityQuestion_Value_RecoveryPanel, securityQuestion) guiSetVisible(AnswerQuestion_Note_RecoveryPanel, true) guiSetVisible(SecurityQuestion_Label_RecoveryPanel, true) guiSetVisible(SecurityQuestion_Value_RecoveryPanel, true) guiSetVisible(Answer_Label_RecoveryPanel, true) guiSetVisible(QuestionAnswer_Edit_RecoveryPanel, true) guiSetVisible(ResetPassword_Button_RecoveryPanel, true) end end ) addEvent( 'openRecoveryPanel', true ) addEventHandler( 'openRecoveryPanel', root, function() guiSetVisible(logaccWind, false) guiSetVisible(RecoveryPanel, true) guiSetVisible(AnswerQuestion_Note_RecoveryPanel, false) guiSetVisible(SecurityQuestion_Label_RecoveryPanel, false) guiSetVisible(SecurityQuestion_Value_RecoveryPanel, false) guiSetVisible(Answer_Label_RecoveryPanel, false) guiSetVisible(QuestionAnswer_Edit_RecoveryPanel, false) guiSetVisible(ResetPassword_Button_RecoveryPanel, false) guiSetVisible(ResetPassword_Note_RecoveryPanel, false) guiSetVisible(NewPass_Label_RecoveryPanel, false) guiSetVisible(RePass_Label_RecoveryPanel, false) guiSetVisible(NewPass_Edit_RecoveryPanel, false) guiSetVisible(RePass_Edit_RecoveryPanel, false) guiSetVisible(ChangePassword_Button_RecoveryPanel, false) guiSetText(QuestionAnswer_Edit_RecoveryPanel, "") guiSetText(NewPass_Edit_RecoveryPanel, "") guiSetText(RePass_Edit_RecoveryPanel, "") guiSetText(QuestionAnswer_Edit_RecoveryPanel, "") guiSetText(AccountName_Edit_RecoveryPanel, "") end ) setTimer(function() if (guiGetVisible(logaccWind) == true) or (guiGetVisible(RecoveryPanel) == true) then guiSetInputMode("no_binds_when_editing") fadeCamera(false) end end, 50, 0) for _, i in ipairs( SequrityQuestions ) do guiComboBoxAddItem(combobo, i) end function openLOGINwindow() fadeCamera(false) guiSetInputMode("no_binds_when_editing") guiSetVisible(GUIEditor.label[15], false) guiSetVisible(GUIEditor.progressbar[1], false) guiSetVisible(logaccWind, not guiGetVisible(logaccWind)) showCursor(guiGetVisible(logaccWind)) end addEventHandler( 'onClientResourceStart', resourceRoot, openLOGINwindow ) addEvent( 'setINFOtopanel', true ) addEventHandler( 'setINFOtopanel', root, function(account, password) guiCheckBoxSetSelected(savac, true) guiSetText(user, account) guiSetText(pas, password) end ) function checkPlayerLogin() for _, player in ipairs(getElementsByType('player')) do triggerServerEvent( 'checkSavedLogin', player ) end end addEventHandler( 'onClientResourceStart', resourceRoot, checkPlayerLogin ) وش هو خطا Link to comment
momar5600 Posted September 11, 2016 Author Share Posted September 11, 2016 موضوع يغلق تم حل مشكلة 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