#Mr.alkmasha Posted August 13, 2014 Share Posted August 13, 2014 ممكن تساعدوني و تحطون ل ذي الوحه سيت تايمير انا حاولت قبل هل مره بس ما ضبطت مع ---------------------------------- -----------| Settings |----------- ---------------------------------- blackLoginScreen = true -- Set to 'true' to display a black screen to the player untill they log in or choose to play as a guest. enableKickPlayer = true -- Set whether to kick the player after they fail to login specified amount of times. disallowLogout = false -- Set whether to show the userpanel to the players if they log out of their accounts. removeBlackScreenTime = 4 -- The time it takes for the black screen to dissapear - If you choose to display the black screen. [iN SECONDS] maxLoginAttempts = 5 -- Set the maximum incorrect login attempts before the player gets kicked - If player kicking is enabled. ---------------------------------- -- Screen and GUI sizes, don't modify screenWidth,screenHeight = guiGetScreenSize() mainWidth,mainHeight = 269,272 regWidth,regHeight = 469,372 addEvent("onRequestIncreaseAttempts",true) addEvent("onRequestDisplayPanel",true) function loginPanel() -- Check if autologin is enabled - If yes, then log the player in, else create and show the userpanel local xmlFile = xmlLoadFile("user.xml") if xmlFile then status = xmlNodeGetAttribute(xmlFile,"autologin") if (status == tostring(true)) then local username = tostring(xmlNodeGetAttribute(xmlFile,"username")) local password = tostring(xmlNodeGetAttribute(xmlFile,"password")) if not (username == "") and not (password == "") then triggerServerEvent("onRequestAutologin",getLocalPlayer(),username,password) end else if blackLoginScreen == true then fadeCamera(false,0,0,0,0) end mainWindow = guiCreateWindow(428,132,624,688,"Login-Panel",false) guiWindowSetSizable(mainWindow,false) guiCreateMemo(23,294,579,364,"قوانين:",false,mainWindow) mInfo = guiCreateMemo(23,294,579,364,infoText,false,mainWindow) guiMemoSetReadOnly(mInfo,true) guiCreateButton(453,210,156,46,"help",false,mainWindow) editUsername = guiCreateEdit(22,75,187,38,"",false,mainWindow) guiEditSetMaxLength(editUsername,30) editPassword = guiCreateEdit(22,146,187,38,"",false,mainWindow) guiEditSetMaxLength(editPassword,30) guiEditSetMasked(editPassword,true) lblUsername = guiCreateLabel(30,52,152,18,"UserName:",false,mainWindow) guiLabelSetVerticalAlign(lblUsername,"center") guiLabelSetHorizontalAlign(lblUsername,"center",false) guiSetFont(lblUsername,"default-bold-small") lblPassword = guiCreateLabel(30,129,152,18,"Passowrd:",false,mainWindow) guiLabelSetVerticalAlign(lblPassword,"center") guiLabelSetHorizontalAlign(lblPassword,"center",false) guiSetFont(lblPassword,"default-bold-small") guiSetFont(btnPlayAsGuest,"default-bold-small") btnLogin = guiCreateButton(19,210,189,46,"Login",false,mainWindow) btnToggleRegister = guiCreateButton(244,210,189,46,"Register",false,mainWindow) guiSetFont(btnToggleRegister,"default-bold-small") registerWindow = guiCreateWindow(screenWidth/2-regWidth/2,screenHeight/2-regHeight/2,regWidth,regHeight,"register-Panel",false) guiWindowSetSizable(registerWindow,false) editRegistrationUsername = guiCreateEdit(98,138,242,25,"",false,registerWindow) editRegistrationPassword = guiCreateEdit(98,195,242,25,"",false,registerWindow) guiEditSetMasked(editRegistrationPassword,true) editRegistrationRepeatPassword = guiCreateEdit(99,252,242,25,"",false,registerWindow) guiEditSetMasked(editRegistrationRepeatPassword,true) lblRUsername = guiCreateLabel(98,100,242,17,"username",false,registerWindow) guiLabelSetVerticalAlign(lblRUsername,"center") guiLabelSetHorizontalAlign(lblRUsername,"center",false) guiSetFont(lblRUsername,"default-bold-small") lblRUsername = guiCreateLabel(98,413,242,17,"Passowrd",false,registerWindow) guiLabelSetVerticalAlign(lblRUsername,"center") guiLabelSetHorizontalAlign(lblRUsername,"center",false) guiSetFont(lblRUsername,"default-bold-small") lblRPassword = guiCreateLabel(98,171,242,17,"Passowrd",false,registerWindow) guiLabelSetVerticalAlign(lblRPassword,"center") guiLabelSetHorizontalAlign(lblRPassword,"center",false) guiSetFont(lblRPassword,"default-bold-small") lblRepeatPassword = guiCreateLabel(98,230,242,17,"Passowrd-2:",false,registerWindow) guiLabelSetVerticalAlign(lblRepeatPassword,"center") guiLabelSetHorizontalAlign(lblRepeatPassword,"center",false) guiSetFont(lblRepeatPassword,"default-bold-small") btnCancel = guiCreateButton(232,292,179,38,"Close",false,registerWindow) guiSetFont(btnCancel,"default-bold-small") btnConfirmRegistration = guiCreateButton(29,292,179,38,"Register",false,registerWindow) guiSetFont(btnConfirmRegistration,"default-bold-small") guiSetVisible(mainWindow, true) guiSetVisible(registerWindow, false) guiSetInputEnabled(true) showCursor(true) addEventHandler("onClientGUIClick",btnLogin,onClickLogin) addEventHandler("onClientGUIClick",btnToggleRegister,onClickRegisterToggle) addEventHandler("onClientGUIClick",btnPlayAsGuest,onClickGuest) addEventHandler("onClientGUIClick",btnConfirmRegistration,onClickRegisterConfirm) addEventHandler("onClientGUIClick",btnCancel,onClickCancel) addEventHandler("onRequestIncreaseAttempts",getRootElement(),increaseAttempts) attemptedLogins = 0 end Link to comment
#Mr.alkmasha Posted August 13, 2014 Author Share Posted August 13, 2014 ابي اضيف للوحه سيت تايمير تفتح بعد دقيقتين حاولت الف مره بس ما زبط Link to comment
ALw7sH Posted August 13, 2014 Share Posted August 13, 2014 ابي اضيف للوحه سيت تايمير تفتح بعد دقيقتين حاولت الف مره بس ما زبط احين هي تشتغل اول ماتشغل السكربت و أول ما اللاعب يخش السيرفر؟ Link to comment
#DRAGON!FIRE Posted August 13, 2014 Share Posted August 13, 2014 ---------------------------------- -----------| Settings |----------- ---------------------------------- blackLoginScreen = true -- Set to 'true' to display a black screen to the player untill they log in or choose to play as a guest. enableKickPlayer = true -- Set whether to kick the player after they fail to login specified amount of times. disallowLogout = false -- Set whether to show the userpanel to the players if they log out of their accounts. removeBlackScreenTime = 4 -- The time it takes for the black screen to dissapear - If you choose to display the black screen. [iN SECONDS] maxLoginAttempts = 5 -- Set the maximum incorrect login attempts before the player gets kicked - If player kicking is enabled. ---------------------------------- -- Screen and GUI sizes, don't modify screenWidth,screenHeight = guiGetScreenSize() mainWidth,mainHeight = 269,272 regWidth,regHeight = 469,372 addEvent("onRequestIncreaseAttempts",true) addEvent("onRequestDisplayPanel",true) function loginPanel() -- Check if autologin is enabled - If yes, then log the player in, else create and show the userpanel local xmlFile = xmlLoadFile("user.xml") if xmlFile then status = xmlNodeGetAttribute(xmlFile,"autologin") if (status == tostring(true)) then local username = tostring(xmlNodeGetAttribute(xmlFile,"username")) local password = tostring(xmlNodeGetAttribute(xmlFile,"password")) if not (username == "") and not (password == "") then triggerServerEvent("onRequestAutologin",getLocalPlayer(),username,password) end else if blackLoginScreen == true then fadeCamera(false,0,0,0,0) end mainWindow = guiCreateWindow(428,132,624,688,"Login-Panel",false) guiWindowSetSizable(mainWindow,false) guiCreateMemo(23,294,579,364,"قوانين:",false,mainWindow) mInfo = guiCreateMemo(23,294,579,364,infoText,false,mainWindow) guiMemoSetReadOnly(mInfo,true) guiCreateButton(453,210,156,46,"help",false,mainWindow) editUsername = guiCreateEdit(22,75,187,38,"",false,mainWindow) guiEditSetMaxLength(editUsername,30) editPassword = guiCreateEdit(22,146,187,38,"",false,mainWindow) guiEditSetMaxLength(editPassword,30) guiEditSetMasked(editPassword,true) lblUsername = guiCreateLabel(30,52,152,18,"UserName:",false,mainWindow) guiLabelSetVerticalAlign(lblUsername,"center") guiLabelSetHorizontalAlign(lblUsername,"center",false) guiSetFont(lblUsername,"default-bold-small") lblPassword = guiCreateLabel(30,129,152,18,"Passowrd:",false,mainWindow) guiLabelSetVerticalAlign(lblPassword,"center") guiLabelSetHorizontalAlign(lblPassword,"center",false) guiSetFont(lblPassword,"default-bold-small") guiSetFont(btnPlayAsGuest,"default-bold-small") btnLogin = guiCreateButton(19,210,189,46,"Login",false,mainWindow) btnToggleRegister = guiCreateButton(244,210,189,46,"Register",false,mainWindow) guiSetFont(btnToggleRegister,"default-bold-small") registerWindow = guiCreateWindow(screenWidth/2-regWidth/2,screenHeight/2-regHeight/2,regWidth,regHeight,"register-Panel",false) guiWindowSetSizable(registerWindow,false) editRegistrationUsername = guiCreateEdit(98,138,242,25,"",false,registerWindow) editRegistrationPassword = guiCreateEdit(98,195,242,25,"",false,registerWindow) guiEditSetMasked(editRegistrationPassword,true) editRegistrationRepeatPassword = guiCreateEdit(99,252,242,25,"",false,registerWindow) guiEditSetMasked(editRegistrationRepeatPassword,true) lblRUsername = guiCreateLabel(98,100,242,17,"username",false,registerWindow) guiLabelSetVerticalAlign(lblRUsername,"center") guiLabelSetHorizontalAlign(lblRUsername,"center",false) guiSetFont(lblRUsername,"default-bold-small") lblRUsername = guiCreateLabel(98,413,242,17,"Passowrd",false,registerWindow) guiLabelSetVerticalAlign(lblRUsername,"center") guiLabelSetHorizontalAlign(lblRUsername,"center",false) guiSetFont(lblRUsername,"default-bold-small") lblRPassword = guiCreateLabel(98,171,242,17,"Passowrd",false,registerWindow) guiLabelSetVerticalAlign(lblRPassword,"center") guiLabelSetHorizontalAlign(lblRPassword,"center",false) guiSetFont(lblRPassword,"default-bold-small") lblRepeatPassword = guiCreateLabel(98,230,242,17,"Passowrd-2:",false,registerWindow) guiLabelSetVerticalAlign(lblRepeatPassword,"center") guiLabelSetHorizontalAlign(lblRepeatPassword,"center",false) guiSetFont(lblRepeatPassword,"default-bold-small") btnCancel = guiCreateButton(232,292,179,38,"Close",false,registerWindow) guiSetFont(btnCancel,"default-bold-small") btnConfirmRegistration = guiCreateButton(29,292,179,38,"Register",false,registerWindow) guiSetFont(btnConfirmRegistration,"default-bold-small") setTimer ( guiSetVisible, 120000, 1, mainWindow, true ) guiSetVisible(registerWindow, false) guiSetInputEnabled(true) showCursor(true) addEventHandler("onClientGUIClick",btnLogin,onClickLogin) addEventHandler("onClientGUIClick",btnToggleRegister,onClickRegisterToggle) addEventHandler("onClientGUIClick",btnPlayAsGuest,onClickGuest) addEventHandler("onClientGUIClick",btnConfirmRegistration,onClickRegisterConfirm) addEventHandler("onClientGUIClick",btnCancel,onClickCancel) addEventHandler("onRequestIncreaseAttempts",getRootElement(),increaseAttempts) attemptedLogins = 0 end Link to comment
#DRAGON!FIRE Posted August 13, 2014 Share Posted August 13, 2014 انت متى تبي التايمر ؟ يوم يدخل السيرفر ؟ Link to comment
#Mr.alkmasha Posted August 13, 2014 Author Share Posted August 13, 2014 يب لانو في انترو قبل الوحه Link to comment
#DRAGON!FIRE Posted August 13, 2014 Share Posted August 13, 2014 انت تبي اللوحة ولا الانترو ؟ Link to comment
#Mr.alkmasha Posted August 13, 2014 Author Share Posted August 13, 2014 يخي ابي الوحه اول ما يخش الاعب تفتح بعد دقيقتين Link to comment
#DRAGON!FIRE Posted August 13, 2014 Share Posted August 13, 2014 يعني جايب لوحة مزروفة وموب طارح الكود كامل .. اطرح الكود كامل Link to comment
#Mr.alkmasha Posted August 13, 2014 Author Share Posted August 13, 2014 معي قيم مود ابي اضيف للوحه حقته انترو و ابي اسوي لها سيت تايمير عشان يوم يخلص الانترو تفتح الوحه Link to comment
ALw7sH Posted August 13, 2014 Share Posted August 13, 2014 اول ماتشغل السكربت مابتجيك اللوحه اذا خرجت ودخلت بتجيك بعد دقيقتين ---------------------------------- -----------| Settings |----------- ---------------------------------- blackLoginScreen = true -- Set to 'true' to display a black screen to the player untill they log in or choose to play as a guest. enableKickPlayer = true -- Set whether to kick the player after they fail to login specified amount of times. disallowLogout = false -- Set whether to show the userpanel to the players if they log out of their accounts. removeBlackScreenTime = 4 -- The time it takes for the black screen to dissapear - If you choose to display the black screen. [iN SECONDS] maxLoginAttempts = 5 -- Set the maximum incorrect login attempts before the player gets kicked - If player kicking is enabled. ---------------------------------- -- Screen and GUI sizes, don't modify screenWidth,screenHeight = guiGetScreenSize() mainWidth,mainHeight = 269,272 regWidth,regHeight = 469,372 addEvent("onRequestIncreaseAttempts",true) addEvent("onRequestDisplayPanel",true) function loginPanel() -- Check if autologin is enabled - If yes, then log the player in, else create and show the userpanel local xmlFile = xmlLoadFile("user.xml") if xmlFile then status = xmlNodeGetAttribute(xmlFile,"autologin") if (status == tostring(true)) then local username = tostring(xmlNodeGetAttribute(xmlFile,"username")) local password = tostring(xmlNodeGetAttribute(xmlFile,"password")) if not (username == "") and not (password == "") then triggerServerEvent("onRequestAutologin",getLocalPlayer(),username,password) end else if blackLoginScreen == true then fadeCamera(false,0,0,0,0) end mainWindow = guiCreateWindow(428,132,624,688,"Login-Panel",false) guiWindowSetSizable(mainWindow,false) guiCreateMemo(23,294,579,364,"قوانين:",false,mainWindow) mInfo = guiCreateMemo(23,294,579,364,infoText,false,mainWindow) guiMemoSetReadOnly(mInfo,true) guiCreateButton(453,210,156,46,"help",false,mainWindow) editUsername = guiCreateEdit(22,75,187,38,"",false,mainWindow) guiEditSetMaxLength(editUsername,30) editPassword = guiCreateEdit(22,146,187,38,"",false,mainWindow) guiEditSetMaxLength(editPassword,30) guiEditSetMasked(editPassword,true) lblUsername = guiCreateLabel(30,52,152,18,"UserName:",false,mainWindow) guiLabelSetVerticalAlign(lblUsername,"center") guiLabelSetHorizontalAlign(lblUsername,"center",false) guiSetFont(lblUsername,"default-bold-small") lblPassword = guiCreateLabel(30,129,152,18,"Passowrd:",false,mainWindow) guiLabelSetVerticalAlign(lblPassword,"center") guiLabelSetHorizontalAlign(lblPassword,"center",false) guiSetFont(lblPassword,"default-bold-small") guiSetFont(btnPlayAsGuest,"default-bold-small") btnLogin = guiCreateButton(19,210,189,46,"Login",false,mainWindow) btnToggleRegister = guiCreateButton(244,210,189,46,"Register",false,mainWindow) guiSetFont(btnToggleRegister,"default-bold-small") registerWindow = guiCreateWindow(screenWidth/2-regWidth/2,screenHeight/2-regHeight/2,regWidth,regHeight,"register-Panel",false) guiWindowSetSizable(registerWindow,false) editRegistrationUsername = guiCreateEdit(98,138,242,25,"",false,registerWindow) editRegistrationPassword = guiCreateEdit(98,195,242,25,"",false,registerWindow) guiEditSetMasked(editRegistrationPassword,true) editRegistrationRepeatPassword = guiCreateEdit(99,252,242,25,"",false,registerWindow) guiEditSetMasked(editRegistrationRepeatPassword,true) lblRUsername = guiCreateLabel(98,100,242,17,"username",false,registerWindow) guiLabelSetVerticalAlign(lblRUsername,"center") guiLabelSetHorizontalAlign(lblRUsername,"center",false) guiSetFont(lblRUsername,"default-bold-small") lblRUsername = guiCreateLabel(98,413,242,17,"Passowrd",false,registerWindow) guiLabelSetVerticalAlign(lblRUsername,"center") guiLabelSetHorizontalAlign(lblRUsername,"center",false) guiSetFont(lblRUsername,"default-bold-small") lblRPassword = guiCreateLabel(98,171,242,17,"Passowrd",false,registerWindow) guiLabelSetVerticalAlign(lblRPassword,"center") guiLabelSetHorizontalAlign(lblRPassword,"center",false) guiSetFont(lblRPassword,"default-bold-small") lblRepeatPassword = guiCreateLabel(98,230,242,17,"Passowrd-2:",false,registerWindow) guiLabelSetVerticalAlign(lblRepeatPassword,"center") guiLabelSetHorizontalAlign(lblRepeatPassword,"center",false) guiSetFont(lblRepeatPassword,"default-bold-small") btnCancel = guiCreateButton(232,292,179,38,"Close",false,registerWindow) guiSetFont(btnCancel,"default-bold-small") btnConfirmRegistration = guiCreateButton(29,292,179,38,"Register",false,registerWindow) guiSetFont(btnConfirmRegistration,"default-bold-small") guiSetVisible(mainWindow, false) guiSetVisible(registerWindow, false) guiSetInputEnabled(true) showCursor(true) addEventHandler("onClientGUIClick",btnLogin,onClickLogin) addEventHandler("onClientGUIClick",btnToggleRegister,onClickRegisterToggle) addEventHandler("onClientGUIClick",btnPlayAsGuest,onClickGuest) addEventHandler("onClientGUIClick",btnConfirmRegistration,onClickRegisterConfirm) addEventHandler("onClientGUIClick",btnCancel,onClickCancel) addEventHandler("onRequestIncreaseAttempts",getRootElement(),increaseAttempts) attemptedLogins = 0 end end end addEventHandler('onClientPlayerJoin',getRootElement(), function() setTimer(function() guiSetVisible(mainWindow, true) end,2*60000,1) end ) Link to comment
#Mr.alkmasha Posted August 13, 2014 Author Share Posted August 13, 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