Mr.king Posted February 18, 2013 Share Posted February 18, 2013 شباب انا عندي مشكلة في لوحة تسجيل ماتبي تفتح client-side function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "sr/ls.png", relative2 ) guiSetFont ( mainBackgroundLabel, newFont ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end GUIEditor_Window = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(0.248,0.1914,0.4756,0.5208,"لوحة التسجيل",false) --------- login = guiCreateButton(117,277,91,62,"دخول",false,GUIEditor_Window[1]) register = guiCreateButton(301,277,91,62,"تسجيل",false,GUIEditor_Window[1]) GUIEditor_edit[1] = guiCreateEdit(120,120,268,43,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(217,81,254,32,"اسمك:",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(219,191,190,41,"كلمة السر",false,GUIEditor_Window[1]) GUIEditor_edit[2] = guiCreateEdit(120,222,268,43,"",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1],false) ------------------------------- function open () guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) ) end ) bindKey( "F6", "down", open) --------------------------- addEventHandler("onClientGUIClick",root, function () local user = guiGetText(GUIEditor edit[1]) local pass = guiGetText(GUIEditor edit[2]) if ( source == login ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onLogin",localPlayer,user,pass) end elseif ( source == register ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onRegister",localPlayer,user,pass) end end end ) Link to comment
iPrestege Posted February 18, 2013 Share Posted February 18, 2013 تفضل : GUIEditor_Window = {} GUIEditor_Label = {} GUIEditor_edit = {} function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "sr/ls.png", relative2 ) guiSetFont ( mainBackgroundLabel, newFont ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end GUIEditor_Window[1] = guiCreateWindow(0.248,0.1914,0.4756,0.5208,"لوحة التسجيل",true) --------- login = guiCreateButton(117,277,91,62,"دخول",false,GUIEditor_Window[1]) register = guiCreateButton(301,277,91,62,"تسجيل",false,GUIEditor_Window[1]) GUIEditor_edit[1] = guiCreateEdit(120,120,268,43,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(217,81,254,32,"اسمك:",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(219,191,190,41,"كلمة السر",false,GUIEditor_Window[1]) GUIEditor_edit[2] = guiCreateEdit(120,222,268,43,"",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1],false) ------------------------------- function open () guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) ) end bindKey( "F6", "down", open) ---------------------------- addEventHandler("onClientGUIClick",root, function () local user = guiGetText(GUIEditor_edit[1]) local pass = guiGetText(GUIEditor_edit[2]) if ( source == login ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onLogin",localPlayer,user,pass) end elseif ( source == register ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onRegister",localPlayer,user,pass) end end end ) Link to comment
Mr.king Posted February 18, 2013 Author Share Posted February 18, 2013 طيب ممكن تعطيني كود يخلي edit يروح منه الاسم بعد ما اضغط على ازرار الدخول والخروج يعني يمتسح الاسم والباس سواء خطا او صح او سجلت الدخول Link to comment
iPrestege Posted February 18, 2013 Share Posted February 18, 2013 طيب ممكن تعطيني كود يخلي editيروح منه الاسم بعد ما اضغط على ازرار الدخول والخروج يعني يمتسح الاسم والباس سواء خطا او صح او سجلت الدخول جرب ذذ : GUIEditor_Window = {} GUIEditor_Label = {} GUIEditor_edit = {} function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "sr/ls.png", relative2 ) guiSetFont ( mainBackgroundLabel, newFont ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end GUIEditor_Window[1] = guiCreateWindow(0.248,0.1914,0.4756,0.5208,"لوحة التسجيل",true) --------- login = guiCreateButton(117,277,91,62,"دخول",false,GUIEditor_Window[1]) register = guiCreateButton(301,277,91,62,"تسجيل",false,GUIEditor_Window[1]) GUIEditor_edit[1] = guiCreateEdit(120,120,268,43,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(217,81,254,32,"اسمك:",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(219,191,190,41,"كلمة السر",false,GUIEditor_Window[1]) GUIEditor_edit[2] = guiCreateEdit(120,222,268,43,"",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1],false) ------------------------------- function open () guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) ) end bindKey( "F6", "down", open) ---------------------------- addEventHandler("onClientGUIClick",root, function () local user = guiGetText(GUIEditor_edit[1]) local pass = guiGetText(GUIEditor_edit[2]) if ( source == login ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onLogin",localPlayer,user,pass) guiSetText(GUIEditor_edit[1], "") guiSetText(GUIEditor_edit[2], "") end elseif ( source == register ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onRegister",localPlayer,user,pass) guiSetText(GUIEditor_edit[1], "") guiSetText(GUIEditor_edit[2], "") end end end ) Link to comment
Mr.king Posted February 18, 2013 Author Share Posted February 18, 2013 ان شاء الله ذا اخر طلب بس ابي لما تحط كلمة السر في edit تكون *** ماتظهر الكلمة بس***** Link to comment
iPrestege Posted February 18, 2013 Share Posted February 18, 2013 ان شاء الله ذا اخر طلب بس ابي لما تحط كلمة السر في editتكون *** ماتظهر الكلمة بس***** GUIEditor_Window = {} GUIEditor_Label = {} GUIEditor_edit = {} function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "sr/ls.png", relative2 ) guiSetFont ( mainBackgroundLabel, newFont ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end GUIEditor_Window[1] = guiCreateWindow(0.248,0.1914,0.4756,0.5208,"لوحة التسجيل",true) --------- login = guiCreateButton(117,277,91,62,"دخول",false,GUIEditor_Window[1]) register = guiCreateButton(301,277,91,62,"تسجيل",false,GUIEditor_Window[1]) GUIEditor_edit[1] = guiCreateEdit(120,120,268,43,"",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(217,81,254,32,"اسمك:",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(219,191,190,41,"كلمة السر",false,GUIEditor_Window[1]) GUIEditor_edit[2] = guiCreateEdit(120,222,268,43,"",false,GUIEditor_Window[1]) guiEditSetMasked ( GUIEditor_edit[2], true ) guiSetVisible(GUIEditor_Window[1],false) ------------------------------- function open () guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) ) end bindKey( "F6", "down", open) ---------------------------- addEventHandler("onClientGUIClick",root, function () local user = guiGetText(GUIEditor_edit[1]) local pass = guiGetText(GUIEditor_edit[2]) if ( source == login ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onLogin",localPlayer,user,pass) guiSetText(GUIEditor_edit[1], "") guiSetText(GUIEditor_edit[2], "") end elseif ( source == register ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onRegister",localPlayer,user,pass) guiSetText(GUIEditor_edit[1], "") guiSetText(GUIEditor_edit[2], "") end end end ) Link to comment
iMr.Dawix~# Posted February 18, 2013 Share Posted February 18, 2013 ان شاء الله ذا اخر طلب بس ابي لما تحط كلمة السر في editتكون *** ماتظهر الكلمة بس***** تبي عصير بعد؟ 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