Jey Posted April 13, 2014 Share Posted April 13, 2014 بسم الله الرحمن الرحيم السلام عليكم ابي فنكشنات لوحة تفتح بعد وقت Link to comment
ΞĪŚŚÀ Posted April 13, 2014 Share Posted April 13, 2014 (edited) setTimer guiSetVisible Edited April 13, 2014 by Guest Link to comment
Jey Posted April 13, 2014 Author Share Posted April 13, 2014 setTimer جربت ما نفع #edit ممكن مثال علي اللوحة Link to comment
ΞĪŚŚÀ Posted April 13, 2014 Share Posted April 13, 2014 setTimer(guiSetVisible,7000,1,اسم النافذه,true) Link to comment
Jey Posted April 13, 2014 Author Share Posted April 13, 2014 setTimer(guiSetVisible,7000,1,اسم النافذه,true) الكود شغال بس الحين في مشكلة انا بسويها علي لوحة تسجيل بس لوحة التسجيل تفتح اول لما اشغل المود كيف اخليها تفتح بعد الوقت المعين ؟ مابيها تفتح لما فتح المود Link to comment
ΞĪŚŚÀ Posted April 13, 2014 Share Posted April 13, 2014 حط تحت اسم النافذة guiSetVisible(اسم النافذه, false) Link to comment
Jey Posted April 13, 2014 Author Share Posted April 13, 2014 حط تحت اسم النافذة guiSetVisible(اسم النافذه, false) حطيته بس نفس المشكلة يشتغل لما اشغل المود Link to comment
ΞĪŚŚÀ Posted April 13, 2014 Share Posted April 13, 2014 حط تحت اسم النافذة guiSetVisible(اسم النافذه, false) حطيته بس نفس المشكلة يشتغل لما اشغل المود تأكد من اسم النآآفذة Link to comment
Jey Posted April 13, 2014 Author Share Posted April 13, 2014 حط تحت اسم النافذة guiSetVisible(اسم النافذه, false) حطيته بس نفس المشكلة يشتغل لما اشغل المود تأكد من اسم النآآفذة function loginPanel() -- Check if autologin is enabled - If yes, then log the player in, else create and show the userpanel local xmlFile = xmlLoadFile(xmlFileName) if xmlFile then status = xmlNodeGetAttribute(xmlFile,"autologin") if (status == "true") then local username = tostring(xmlNodeGetAttribute(xmlFile,"username")) local password = tostring(xmlNodeGetAttribute(xmlFile,"password")) if not (username == "") and not (password == "") then setTimer(triggerServerEvent, 1000, 1, "onRequestAutologin",player,username,password) end else if blackLoginScreen == true then fadeCamera(false,0,0,0,0) end mainWindow = guiCreateWindow(screenWidth/2-mainWidth/2,screenHeight/2-mainHeight/2,mainWidth,mainHeight,"Login panel",false) guiSetVisible(mainWindow, false) mInfo = guiCreateMemo(21,36,411,278,infoText,false,mainWindow) guiMemoSetReadOnly(mInfo,true) guiWindowSetSizable(mainWindow,false) editUsername = guiCreateEdit(53,364,187,25,"",false,mainWindow) guiEditSetMaxLength(editUsername,30) editPassword = guiCreateEdit(53,421,187,25,"",false,mainWindow) guiEditSetMaxLength(editPassword,30) guiEditSetMasked(editPassword,true) lblUsername = guiCreateLabel(67,330,158,38,"Username:",false,mainWindow) guiLabelSetColor(lblUsername,255,0,0) guiLabelSetVerticalAlign(lblUsername,"center") guiLabelSetHorizontalAlign(lblUsername,"center",false) guiSetFont(lblUsername,"default-bold-small") lblPassword = guiCreateLabel(67,389,158,38,"Password:",false,mainWindow) guiLabelSetColor(lblPassword,255,0,0) guiLabelSetVerticalAlign(lblPassword,"center") guiLabelSetHorizontalAlign(lblPassword,"center",false) guiSetFont(lblPassword,"default-bold-small") btnLogin = guiCreateButton(280,368,242,74,"Login",false,mainWindow) guiSetFont(btnLogin,"sa-header") btnToggleRegister = guiCreateButton(548,368,168,74,"Register",false,mainWindow) guiSetFont(btnToggleRegister,"default-bold-small") registerWindow = guiCreateWindow(screenWidth/2-regWidth/2,screenHeight/2-regHeight/2,regWidth,regHeight,"Registration",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) lblRegister = guiCreateLabel(24,24,391,97,"Register",false,registerWindow) guiLabelSetColor(lblRegister,0,85,255) guiLabelSetVerticalAlign(lblRegister,"center") guiLabelSetHorizontalAlign(lblRegister,"center",false) guiSetFont(lblRegister,"sa-gothic") lblRUsername = guiCreateLabel(98,113,242,17,"Username:",false,registerWindow) guiLabelSetColor(lblRUsername,0,85,255) guiLabelSetVerticalAlign(lblRUsername,"center") guiLabelSetHorizontalAlign(lblRUsername,"center",false) guiSetFont(lblRUsername,"default-bold-small") lblRPassword = guiCreateLabel(98,171,242,17,"Password:",false,registerWindow) guiLabelSetColor(lblRPassword,0,85,255) guiLabelSetVerticalAlign(lblRPassword,"center") guiLabelSetHorizontalAlign(lblRPassword,"center",false) guiSetFont(lblRPassword,"default-bold-small") lblRepeatPassword = guiCreateLabel(98,230,242,17,"Repeat password:",false,registerWindow) guiLabelSetColor(lblRepeatPassword,0,85,255) guiLabelSetVerticalAlign(lblRepeatPassword,"center") guiLabelSetHorizontalAlign(lblRepeatPassword,"center",false) guiSetFont(lblRepeatPassword,"default-bold-small") btnCancel = guiCreateButton(232,292,179,38,"Cancel",false,registerWindow) guiSetFont(btnCancel,"default-bold-small") btnConfirmRegistration = guiCreateButton(29,292,179,38,"Confirm & register!",false,registerWindow) guiSetFont(btnConfirmRegistration,"default-bold-small") guiCreateStaticImage(440,23,300,345,"images/logo.jpg",false,mainWindow) 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) setTimer(guiSetVisible,7000,1,mainWindow,true) Link to comment
ΞĪŚŚÀ Posted April 13, 2014 Share Posted April 13, 2014 function loginPanel() -- Check if autologin is enabled - If yes, then log the player in, else create and show the userpanel local xmlFile = xmlLoadFile(xmlFileName) if xmlFile then status = xmlNodeGetAttribute(xmlFile,"autologin") if (status == "true") then local username = tostring(xmlNodeGetAttribute(xmlFile,"username")) local password = tostring(xmlNodeGetAttribute(xmlFile,"password")) if not (username == "") and not (password == "") then setTimer(triggerServerEvent, 1000, 1, "onRequestAutologin",player,username,password) end else if blackLoginScreen == true then fadeCamera(false,0,0,0,0) end mainWindow = guiCreateWindow(screenWidth/2-mainWidth/2,screenHeight/2-mainHeight/2,mainWidth,mainHeight,"Login panel",false) guiSetVisible(mainWindow, false) mInfo = guiCreateMemo(21,36,411,278,infoText,false,mainWindow) guiMemoSetReadOnly(mInfo,true) guiWindowSetSizable(mainWindow,false) editUsername = guiCreateEdit(53,364,187,25,"",false,mainWindow) guiEditSetMaxLength(editUsername,30) editPassword = guiCreateEdit(53,421,187,25,"",false,mainWindow) guiEditSetMaxLength(editPassword,30) guiEditSetMasked(editPassword,true) lblUsername = guiCreateLabel(67,330,158,38,"Username:",false,mainWindow) guiLabelSetColor(lblUsername,255,0,0) guiLabelSetVerticalAlign(lblUsername,"center") guiLabelSetHorizontalAlign(lblUsername,"center",false) guiSetFont(lblUsername,"default-bold-small") lblPassword = guiCreateLabel(67,389,158,38,"Password:",false,mainWindow) guiLabelSetColor(lblPassword,255,0,0) guiLabelSetVerticalAlign(lblPassword,"center") guiLabelSetHorizontalAlign(lblPassword,"center",false) guiSetFont(lblPassword,"default-bold-small") btnLogin = guiCreateButton(280,368,242,74,"Login",false,mainWindow) guiSetFont(btnLogin,"sa-header") btnToggleRegister = guiCreateButton(548,368,168,74,"Register",false,mainWindow) guiSetFont(btnToggleRegister,"default-bold-small") registerWindow = guiCreateWindow(screenWidth/2-regWidth/2,screenHeight/2-regHeight/2,regWidth,regHeight,"Registration",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) lblRegister = guiCreateLabel(24,24,391,97,"Register",false,registerWindow) guiLabelSetColor(lblRegister,0,85,255) guiLabelSetVerticalAlign(lblRegister,"center") guiLabelSetHorizontalAlign(lblRegister,"center",false) guiSetFont(lblRegister,"sa-gothic") lblRUsername = guiCreateLabel(98,113,242,17,"Username:",false,registerWindow) guiLabelSetColor(lblRUsername,0,85,255) guiLabelSetVerticalAlign(lblRUsername,"center") guiLabelSetHorizontalAlign(lblRUsername,"center",false) guiSetFont(lblRUsername,"default-bold-small") lblRPassword = guiCreateLabel(98,171,242,17,"Password:",false,registerWindow) guiLabelSetColor(lblRPassword,0,85,255) guiLabelSetVerticalAlign(lblRPassword,"center") guiLabelSetHorizontalAlign(lblRPassword,"center",false) guiSetFont(lblRPassword,"default-bold-small") lblRepeatPassword = guiCreateLabel(98,230,242,17,"Repeat password:",false,registerWindow) guiLabelSetColor(lblRepeatPassword,0,85,255) guiLabelSetVerticalAlign(lblRepeatPassword,"center") guiLabelSetHorizontalAlign(lblRepeatPassword,"center",false) guiSetFont(lblRepeatPassword,"default-bold-small") btnCancel = guiCreateButton(232,292,179,38,"Cancel",false,registerWindow) guiSetFont(btnCancel,"default-bold-small") btnConfirmRegistration = guiCreateButton(29,292,179,38,"Confirm & register!",false,registerWindow) guiSetFont(btnConfirmRegistration,"default-bold-small") guiCreateStaticImage(440,23,300,345,"images/logo.jpg",false,mainWindow) 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) setTimer(guiSetVisible,7000,1,mainWindow,true) Link to comment
Jey Posted April 13, 2014 Author Share Posted April 13, 2014 function loginPanel() -- Check if autologin is enabled - If yes, then log the player in, else create and show the userpanel local xmlFile = xmlLoadFile(xmlFileName) if xmlFile then status = xmlNodeGetAttribute(xmlFile,"autologin") if (status == "true") then local username = tostring(xmlNodeGetAttribute(xmlFile,"username")) local password = tostring(xmlNodeGetAttribute(xmlFile,"password")) if not (username == "") and not (password == "") then setTimer(triggerServerEvent, 1000, 1, "onRequestAutologin",player,username,password) end else if blackLoginScreen == true then fadeCamera(false,0,0,0,0) end mainWindow = guiCreateWindow(screenWidth/2-mainWidth/2,screenHeight/2-mainHeight/2,mainWidth,mainHeight,"Login panel",false) guiSetVisible(mainWindow, false) mInfo = guiCreateMemo(21,36,411,278,infoText,false,mainWindow) guiMemoSetReadOnly(mInfo,true) guiWindowSetSizable(mainWindow,false) editUsername = guiCreateEdit(53,364,187,25,"",false,mainWindow) guiEditSetMaxLength(editUsername,30) editPassword = guiCreateEdit(53,421,187,25,"",false,mainWindow) guiEditSetMaxLength(editPassword,30) guiEditSetMasked(editPassword,true) lblUsername = guiCreateLabel(67,330,158,38,"Username:",false,mainWindow) guiLabelSetColor(lblUsername,255,0,0) guiLabelSetVerticalAlign(lblUsername,"center") guiLabelSetHorizontalAlign(lblUsername,"center",false) guiSetFont(lblUsername,"default-bold-small") lblPassword = guiCreateLabel(67,389,158,38,"Password:",false,mainWindow) guiLabelSetColor(lblPassword,255,0,0) guiLabelSetVerticalAlign(lblPassword,"center") guiLabelSetHorizontalAlign(lblPassword,"center",false) guiSetFont(lblPassword,"default-bold-small") btnLogin = guiCreateButton(280,368,242,74,"Login",false,mainWindow) guiSetFont(btnLogin,"sa-header") btnToggleRegister = guiCreateButton(548,368,168,74,"Register",false,mainWindow) guiSetFont(btnToggleRegister,"default-bold-small") registerWindow = guiCreateWindow(screenWidth/2-regWidth/2,screenHeight/2-regHeight/2,regWidth,regHeight,"Registration",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) lblRegister = guiCreateLabel(24,24,391,97,"Register",false,registerWindow) guiLabelSetColor(lblRegister,0,85,255) guiLabelSetVerticalAlign(lblRegister,"center") guiLabelSetHorizontalAlign(lblRegister,"center",false) guiSetFont(lblRegister,"sa-gothic") lblRUsername = guiCreateLabel(98,113,242,17,"Username:",false,registerWindow) guiLabelSetColor(lblRUsername,0,85,255) guiLabelSetVerticalAlign(lblRUsername,"center") guiLabelSetHorizontalAlign(lblRUsername,"center",false) guiSetFont(lblRUsername,"default-bold-small") lblRPassword = guiCreateLabel(98,171,242,17,"Password:",false,registerWindow) guiLabelSetColor(lblRPassword,0,85,255) guiLabelSetVerticalAlign(lblRPassword,"center") guiLabelSetHorizontalAlign(lblRPassword,"center",false) guiSetFont(lblRPassword,"default-bold-small") lblRepeatPassword = guiCreateLabel(98,230,242,17,"Repeat password:",false,registerWindow) guiLabelSetColor(lblRepeatPassword,0,85,255) guiLabelSetVerticalAlign(lblRepeatPassword,"center") guiLabelSetHorizontalAlign(lblRepeatPassword,"center",false) guiSetFont(lblRepeatPassword,"default-bold-small") btnCancel = guiCreateButton(232,292,179,38,"Cancel",false,registerWindow) guiSetFont(btnCancel,"default-bold-small") btnConfirmRegistration = guiCreateButton(29,292,179,38,"Confirm & register!",false,registerWindow) guiSetFont(btnConfirmRegistration,"default-bold-small") guiCreateStaticImage(440,23,300,345,"images/logo.jpg",false,mainWindow) 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) setTimer(guiSetVisible,7000,1,mainWindow,true) اوكي مشكور اشتغل Link to comment
ΞĪŚŚÀ Posted April 13, 2014 Share Posted April 13, 2014 اوكي مشكور اشتغل حـﯾ̃ـٱڪ ٱڵله Link to comment
</Mr.Tn6eL> Posted April 14, 2014 Share Posted April 14, 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