[iMr]-W[i]Fi,.! Posted May 28, 2015 Share Posted May 28, 2015 سلام عليكم ورحمه الله وبركاته اما بعدد :- زي ما شايفين بالموضوع الكود هو GUIEditor = { edit = {}, button = {}, staticimage = {}, checkbox = {}, } onlogin = guiCreateButton(295, 422, 107, 41, "", false) guiSetAlpha(GUIEditor.button[1], 0.00) onregister = guiCreateButton(414, 422, 108, 41, "", false) guiSetAlpha(GUIEditor.button[2], 0.00) GUIEditor.button[3] = guiCreateButton(295, 469, 228, 41, "", false) guiSetAlpha(GUIEditor.button[3], 0.00) GUIEditor.checkbox[1] = guiCreateCheckBox(306, 354, 15, 15, "تذكرني", false, false) user = guiCreateEdit(20, 29, 208, 30, "",false) pass = guiCreateEdit(20, 100, 208, 30, "",false) GUIEditor.staticimage[1] = guiCreateStaticImage(286, 219, 250, 321, "S1.png", false) guiSetAlpha(GUIEditor.staticimage[1], 0.65) GUIEditor.staticimage[2] = guiCreateStaticImage(286, 176, 250, 33, "S1.png", false) guiSetAlpha(GUIEditor.staticimage[2], 0.64) function login() dxDrawText("Login - Register v.1", 330, 176, 483, 204, tocolor(255, 255, 255, 255), 1, "default", "left", "center", false, false, true, false, false) dxDrawText(":اسم المستخدم ", 351, 219, 473, 238, tocolor(209, 178, 79, 255), 2, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(": كلمة المرور ", 350, 285, 463, 313, tocolor(209, 178, 79, 255), 2, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(296, 422, 109, 42, tocolor(216, 189, 104, 255), true) dxDrawRectangle(296, 470, 229, 41, tocolor(216, 189, 104, 255), true) dxDrawLine(285, 219, 407, 248, tocolor(255, 255, 255, 255), 1, true) dxDrawRectangle(416, 422, 109, 42, tocolor(216, 189, 104, 255), true) dxDrawLine(535, 219, 536, 540, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(285, 539, 536, 539, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 219, 537, 219, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 209, 537, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 176, 537, 176, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(537, 176, 537, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 176, 286, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawText("*سجل عشان تنحفظ ساعاتك", 293, 517, 511, 534, tocolor(199, 131, 1, 255), 1, "default-bold", "left", "top", true, false, true, false, false) dxDrawText("تذكرني", 323, 353, 418, 373, tocolor(255, 255, 255, 255), 1, "default-bold", "left", "top", false, false, true, false, false) end addEventHandler("onClientRender", root, login) function login1() dxDrawText("Login", 295, 422, 400, 461, tocolor(201, 0, 0, 255), 2, "default", "center", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, login1) function login2() dxDrawText("Login", 295, 422, 400, 461, tocolor(47, 47, 51, 255), 2, "default", "center", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, login2) function Register1() dxDrawText("Register", 425, 421, 575, 460, tocolor(47, 47, 51, 255), 2, "default", "left", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, Register1) function Register2() dxDrawText("Register", 425, 421, 575, 460, tocolor(201, 0, 0, 255), 2, "default", "left", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, Register2) function Guest1() dxDrawText(" Guest", 306, 474, 506, 506, tocolor(47, 47, 51, 255), 2, "default", "center", "center", false, true, true, false, false) end addEventHandler("onClientRender", root, Guest1) function Guest2) dxDrawText(" Guest", 306, 474, 506, 506, tocolor(201, 0, 0, 255), 2, "default", "center", "center", false, true, true, false, false) end addEventHandler("onClientRender", root, Guest2) removeEventHandler("onClientRender", root, login1) removeEventHandler("onClientRender", root, Register2) removeEventHandler("onClientRender", root, Guest2) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == onlogin ) then triggerServerEvent("onlogin",getLocalPlayer(), guiGetText(user), guiGetText(pass)) elseif ( source == onregister ) then triggerServerEvent("onregister",getLocalPlayer(), guiGetText(user), guiGetText(pass)) end end function Show() if source == GUIEditor.button[3] then removeEventHandler("onClientRender", root, login) end end addEventHandler ("onClientGUIClick", root, Show) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == onlogin ) then addEventHandler("onClientRender", root, login1) removeEventHandler("onClientRender", root, login2) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == onlogin ) then removeEventHandler("onClientRender", root, login1) addEventHandler("onClientRender", root, login2) end end ) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == onregister ) then addEventHandler("onClientRender", root, Register2) removeEventHandler("onClientRender", root, Register1) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == onregister ) then removeEventHandler("onClientRender", root, Register2) addEventHandler("onClientRender", root, Register1) end end ) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == GUIEditor.button[3] ) then addEventHandler("onClientRender", root, Guest2) removeEventHandler("onClientRender", root, Guest1) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == GUIEditor.button[3] ) then removeEventHandler("onClientRender", root, Guest2) addEventHandler("onClientRender", root, Guest1) end end ) يجيني بالديبوق ERROR : Loading script failed Dx_Login/c.lua.;76'(' expected near ' )' وسلام خير الختام Link to comment
TreKa Posted May 28, 2015 Share Posted May 28, 2015 جرب GUIEditor = { edit = {}, button = {}, staticimage = {}, checkbox = {}, } onlogin = guiCreateButton(295, 422, 107, 41, "", false) guiSetAlpha(GUIEditor.button[1], 0.00) onregister = guiCreateButton(414, 422, 108, 41, "", false) guiSetAlpha(GUIEditor.button[2], 0.00) GUIEditor.button[3] = guiCreateButton(295, 469, 228, 41, "", false) guiSetAlpha(GUIEditor.button[3], 0.00) GUIEditor.checkbox[1] = guiCreateCheckBox(306, 354, 15, 15, "تذكرني", false, false) user = guiCreateEdit(20, 29, 208, 30, "",false) pass = guiCreateEdit(20, 100, 208, 30, "",false) GUIEditor.staticimage[1] = guiCreateStaticImage(286, 219, 250, 321, "S1.png", false) guiSetAlpha(GUIEditor.staticimage[1], 0.65) GUIEditor.staticimage[2] = guiCreateStaticImage(286, 176, 250, 33, "S1.png", false) guiSetAlpha(GUIEditor.staticimage[2], 0.64) function login() dxDrawText("Login - Register v.1", 330, 176, 483, 204, tocolor(255, 255, 255, 255), 1, "default", "left", "center", false, false, true, false, false) dxDrawText(":اسم المستخدم ", 351, 219, 473, 238, tocolor(209, 178, 79, 255), 2, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(": كلمة المرور ", 350, 285, 463, 313, tocolor(209, 178, 79, 255), 2, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(296, 422, 109, 42, tocolor(216, 189, 104, 255), true) dxDrawRectangle(296, 470, 229, 41, tocolor(216, 189, 104, 255), true) dxDrawLine(285, 219, 407, 248, tocolor(255, 255, 255, 255), 1, true) dxDrawRectangle(416, 422, 109, 42, tocolor(216, 189, 104, 255), true) dxDrawLine(535, 219, 536, 540, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(285, 539, 536, 539, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 219, 537, 219, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 209, 537, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 176, 537, 176, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(537, 176, 537, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 176, 286, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawText("*سجل عشان تنحفظ ساعاتك", 293, 517, 511, 534, tocolor(199, 131, 1, 255), 1, "default-bold", "left", "top", true, false, true, false, false) dxDrawText("تذكرني", 323, 353, 418, 373, tocolor(255, 255, 255, 255), 1, "default-bold", "left", "top", false, false, true, false, false) end addEventHandler("onClientRender", root, login) function login1() dxDrawText("Login", 295, 422, 400, 461, tocolor(201, 0, 0, 255), 2, "default", "center", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, login1) function login2() dxDrawText("Login", 295, 422, 400, 461, tocolor(47, 47, 51, 255), 2, "default", "center", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, login2) function Register1() dxDrawText("Register", 425, 421, 575, 460, tocolor(47, 47, 51, 255), 2, "default", "left", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, Register1) function Register2() dxDrawText("Register", 425, 421, 575, 460, tocolor(201, 0, 0, 255), 2, "default", "left", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, Register2) function Guest1() dxDrawText(" Guest", 306, 474, 506, 506, tocolor(47, 47, 51, 255), 2, "default", "center", "center", false, true, true, false, false) end addEventHandler("onClientRender", root, Guest1) function Guest2() dxDrawText(" Guest", 306, 474, 506, 506, tocolor(201, 0, 0, 255), 2, "default", "center", "center", false, true, true, false, false) end addEventHandler("onClientRender", root, Guest2) removeEventHandler("onClientRender", root, login1) removeEventHandler("onClientRender", root, Register2) removeEventHandler("onClientRender", root, Guest2) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == onlogin ) then triggerServerEvent("onlogin",getLocalPlayer(), guiGetText(user), guiGetText(pass)) elseif ( source == onregister ) then triggerServerEvent("onregister",getLocalPlayer(), guiGetText(user), guiGetText(pass)) end end function Show() if source == GUIEditor.button[3] then removeEventHandler("onClientRender", root, login) end end addEventHandler ("onClientGUIClick", root, Show) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == onlogin ) then addEventHandler("onClientRender", root, login1) removeEventHandler("onClientRender", root, login2) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == onlogin ) then removeEventHandler("onClientRender", root, login1) addEventHandler("onClientRender", root, login2) end end ) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == onregister ) then addEventHandler("onClientRender", root, Register2) removeEventHandler("onClientRender", root, Register1) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == onregister ) then removeEventHandler("onClientRender", root, Register2) addEventHandler("onClientRender", root, Register1) end end ) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == GUIEditor.button[3] ) then addEventHandler("onClientRender", root, Guest2) removeEventHandler("onClientRender", root, Guest1) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == GUIEditor.button[3] ) then removeEventHandler("onClientRender", root, Guest2) addEventHandler("onClientRender", root, Guest1) end end ) Link to comment
[iMr]-W[i]Fi,.! Posted May 28, 2015 Author Share Posted May 28, 2015 ^^ المشكله نفسها الديبوق جديد ~ ERROR : Loading script failed:Dx_Login\c.lua:95:')' expected(to close '(' at line 87) near 'function' Link to comment
shwaeki Posted May 28, 2015 Share Posted May 28, 2015 GUIEditor = { edit = {}, button = {}, staticimage = {}, checkbox = {}, } onlogin = guiCreateButton(295, 422, 107, 41, "", false) guiSetAlpha(GUIEditor.button[1], 0.00) onregister = guiCreateButton(414, 422, 108, 41, "", false) guiSetAlpha(GUIEditor.button[2], 0.00) GUIEditor.button[3] = guiCreateButton(295, 469, 228, 41, "", false) guiSetAlpha(GUIEditor.button[3], 0.00) GUIEditor.checkbox[1] = guiCreateCheckBox(306, 354, 15, 15, "تذكرني", false, false) user = guiCreateEdit(20, 29, 208, 30, "",false) pass = guiCreateEdit(20, 100, 208, 30, "",false) GUIEditor.staticimage[1] = guiCreateStaticImage(286, 219, 250, 321, "S1.png", false) guiSetAlpha(GUIEditor.staticimage[1], 0.65) GUIEditor.staticimage[2] = guiCreateStaticImage(286, 176, 250, 33, "S1.png", false) guiSetAlpha(GUIEditor.staticimage[2], 0.64) function login() dxDrawText("Login - Register v.1", 330, 176, 483, 204, tocolor(255, 255, 255, 255), 1, "default", "left", "center", false, false, true, false, false) dxDrawText(":اسم المستخدم ", 351, 219, 473, 238, tocolor(209, 178, 79, 255), 2, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(": كلمة المرور ", 350, 285, 463, 313, tocolor(209, 178, 79, 255), 2, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(296, 422, 109, 42, tocolor(216, 189, 104, 255), true) dxDrawRectangle(296, 470, 229, 41, tocolor(216, 189, 104, 255), true) dxDrawLine(285, 219, 407, 248, tocolor(255, 255, 255, 255), 1, true) dxDrawRectangle(416, 422, 109, 42, tocolor(216, 189, 104, 255), true) dxDrawLine(535, 219, 536, 540, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(285, 539, 536, 539, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 219, 537, 219, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 209, 537, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 176, 537, 176, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(537, 176, 537, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 176, 286, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawText("*سجل عشان تنحفظ ساعاتك", 293, 517, 511, 534, tocolor(199, 131, 1, 255), 1, "default-bold", "left", "top", true, false, true, false, false) dxDrawText("تذكرني", 323, 353, 418, 373, tocolor(255, 255, 255, 255), 1, "default-bold", "left", "top", false, false, true, false, false) end addEventHandler("onClientRender", root, login) function login1() dxDrawText("Login", 295, 422, 400, 461, tocolor(201, 0, 0, 255), 2, "default", "center", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, login1) function login2() dxDrawText("Login", 295, 422, 400, 461, tocolor(47, 47, 51, 255), 2, "default", "center", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, login2) function Register1() dxDrawText("Register", 425, 421, 575, 460, tocolor(47, 47, 51, 255), 2, "default", "left", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, Register1) function Register2() dxDrawText("Register", 425, 421, 575, 460, tocolor(201, 0, 0, 255), 2, "default", "left", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, Register2) function Guest1() dxDrawText(" Guest", 306, 474, 506, 506, tocolor(47, 47, 51, 255), 2, "default", "center", "center", false, true, true, false, false) end addEventHandler("onClientRender", root, Guest1) function Guest2() dxDrawText(" Guest", 306, 474, 506, 506, tocolor(201, 0, 0, 255), 2, "default", "center", "center", false, true, true, false, false) end addEventHandler("onClientRender", root, Guest2) removeEventHandler("onClientRender", root, login1) removeEventHandler("onClientRender", root, Register2) removeEventHandler("onClientRender", root, Guest2) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == onlogin ) then triggerServerEvent("onlogin",getLocalPlayer(), guiGetText(user), guiGetText(pass)) elseif ( source == onregister ) then triggerServerEvent("onregister",getLocalPlayer(), guiGetText(user), guiGetText(pass)) end end ) function Show() if source == GUIEditor.button[3] then removeEventHandler("onClientRender", root, login) end end addEventHandler ("onClientGUIClick", root, Show) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == onlogin ) then addEventHandler("onClientRender", root, login1) removeEventHandler("onClientRender", root, login2) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == onlogin ) then removeEventHandler("onClientRender", root, login1) addEventHandler("onClientRender", root, login2) end end ) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == onregister ) then addEventHandler("onClientRender", root, Register2) removeEventHandler("onClientRender", root, Register1) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == onregister ) then removeEventHandler("onClientRender", root, Register2) addEventHandler("onClientRender", root, Register1) end end ) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == GUIEditor.button[3] ) then addEventHandler("onClientRender", root, Guest2) removeEventHandler("onClientRender", root, Guest1) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == GUIEditor.button[3] ) then removeEventHandler("onClientRender", root, Guest2) addEventHandler("onClientRender", root, Guest1) end end ) Link to comment
Walid Posted May 28, 2015 Share Posted May 28, 2015 (edited) "(" missing here function Guest2 () an other one ")" missing. here end) BTW many things wrong in your code. Edited May 28, 2015 by Guest Link to comment
i S6O Posted May 28, 2015 Share Posted May 28, 2015 جرب# ماجربته -- #ClientSide onlogin = guiCreateButton(295, 422, 107, 41, "", false) onregister = guiCreateButton(414, 422, 108, 41, "", false) GUIEditor.button[3] = guiCreateButton(295, 469, 228, 41, "", false) GUIEditor.checkbox[1] = guiCreateCheckBox(306, 354, 15, 15, "تذكرني", false, false) user = guiCreateEdit(20, 29, 208, 30, "",false) pass = guiCreateEdit(20, 100, 208, 30, "",false) GUIEditor.staticimage[1] = guiCreateStaticImage(286, 219, 250, 321, "S1.png", false) GUIEditor.staticimage[2] = guiCreateStaticImage(286, 176, 250, 33, "S1.png", false) guiSetAlpha(onlogin, 0.00) guiSetAlpha(onregister, 0.00) guiSetAlpha(GUIEditor.button[3], 0.00) guiSetAlpha(GUIEditor.staticimage[1], 0.65) guiSetAlpha(GUIEditor.staticimage[2], 0.64) function login() dxDrawText("Login - Register v.1", 330, 176, 483, 204, tocolor(255, 255, 255, 255), 1, "default", "left", "center", false, false, true, false, false) dxDrawText(":اسم المستخدم ", 351, 219, 473, 238, tocolor(209, 178, 79, 255), 2, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(": كلمة المرور ", 350, 285, 463, 313, tocolor(209, 178, 79, 255), 2, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(296, 422, 109, 42, tocolor(216, 189, 104, 255), true) dxDrawRectangle(296, 470, 229, 41, tocolor(216, 189, 104, 255), true) dxDrawLine(285, 219, 407, 248, tocolor(255, 255, 255, 255), 1, true) dxDrawRectangle(416, 422, 109, 42, tocolor(216, 189, 104, 255), true) dxDrawLine(535, 219, 536, 540, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(285, 539, 536, 539, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 219, 537, 219, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 209, 537, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 176, 537, 176, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(537, 176, 537, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 176, 286, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawText("*سجل عشان تنحفظ ساعاتك", 293, 517, 511, 534, tocolor(199, 131, 1, 255), 1, "default-bold", "left", "top", true, false, true, false, false) dxDrawText("تذكرني", 323, 353, 418, 373, tocolor(255, 255, 255, 255), 1, "default-bold", "left", "top", false, false, true, false, false) end addEventHandler("onClientRender", root, login) addEventHandler("onClientRender", root, login1) addEventHandler("onClientRender", root, login2) addEventHandler("onClientRender", root, Register1) addEventHandler("onClientRender", root, Register2) addEventHandler("onClientRender", root, Guest1) addEventHandler("onClientRender", root, Guest2) function login1() dxDrawText("Login", 295, 422, 400, 461, tocolor(201, 0, 0, 255), 2, "default", "center", "center", false, false, true, false, false) end function login2() dxDrawText("Login", 295, 422, 400, 461, tocolor(47, 47, 51, 255), 2, "default", "center", "center", false, false, true, false, false) end function Register1() dxDrawText("Register", 425, 421, 575, 460, tocolor(47, 47, 51, 255), 2, "default", "left", "center", false, false, true, false, false) end function Register2() dxDrawText("Register", 425, 421, 575, 460, tocolor(201, 0, 0, 255), 2, "default", "left", "center", false, false, true, false, false) end function Guest1() dxDrawText(" Guest", 306, 474, 506, 506, tocolor(47, 47, 51, 255), 2, "default", "center", "center", false, true, true, false, false) end function Guest2) dxDrawText(" Guest", 306, 474, 506, 506, tocolor(201, 0, 0, 255), 2, "default", "center", "center", false, true, true, false, false) end addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == onlogin ) then triggerServerEvent("onlogin",getLocalPlayer(), guiGetText(user), guiGetText(pass)) elseif ( source == onregister ) then triggerServerEvent("onregister",getLocalPlayer(), guiGetText(user), guiGetText(pass)) end end function Show() if source == GUIEditor.button[3] then removeEventHandler("onClientRender", root, login) end end addEventHandler ("onClientGUIClick", root, Show) -- سو مثل كذا على كل الازرار وكذا function OnButton3 ( ) if isElement ( GUIEditor.button[3] ) then if eventName == 'onClientMouseEnter' then addEventHandler("onClientRender", root, Guest2) else removeEventHandler("onClientRender", root, Guest2) end end end -- الكود الي فوق حق برستيجي addEventHandler( "onClientMouseEnter", GUIEditor.button[3], Show1 ) addEventHandler( "onClientMouseLeave", GUIEditor.button[3], Show1 ) Link to comment
[iMr]-W[i]Fi,.! Posted May 28, 2015 Author Share Posted May 28, 2015 شغال تمام لكن ما تظهر على صورته يعني الاين طاير هنا والاديت في الزوايه Link to comment
[iMr]-W[i]Fi,.! Posted May 28, 2015 Author Share Posted May 28, 2015 "(" missing here function Guest2 () an other one ")" missing. here end) BTW many things wrong in your code. Debug : ERROR:Loadin script failed: Dx_Login\c.lua:56:unexpected symbol near ')' ابو عابد ترا كله حقك مو الي ابيه راجع حقي الكود زين شكراا ابو عابد على الكوود ~ function OnButton3 ( ) if isElement ( GUIEditor.button[3] ) then if eventName == 'onClientMouseEnter' then addEventHandler("onClientRender", root, Guest2) else removeEventHandler("onClientRender", root, Guest2) end end end الحين في اشياء ما ضبطتها في كودي Link to comment
Simple. Posted May 28, 2015 Share Posted May 28, 2015 GUIEditor = { edit = {}, button = {}, staticimage = {}, checkbox = {}, } onlogin = guiCreateButton(295, 422, 107, 41, "", false) guiSetAlpha(GUIEditor.button[1], 0.00) onregister = guiCreateButton(414, 422, 108, 41, "", false) guiSetAlpha(GUIEditor.button[2], 0.00) GUIEditor.button[3] = guiCreateButton(295, 469, 228, 41, "", false) guiSetAlpha(GUIEditor.button[3], 0.00) GUIEditor.checkbox[1] = guiCreateCheckBox(306, 354, 15, 15, "تذكرني", false, false) user = guiCreateEdit(20, 29, 208, 30, "",false) pass = guiCreateEdit(20, 100, 208, 30, "",false) GUIEditor.staticimage[1] = guiCreateStaticImage(286, 219, 250, 321, "S1.png", false) guiSetAlpha(GUIEditor.staticimage[1], 0.65) GUIEditor.staticimage[2] = guiCreateStaticImage(286, 176, 250, 33, "S1.png", false) guiSetAlpha(GUIEditor.staticimage[2], 0.64) function login() dxDrawText("Login - Register v.1", 330, 176, 483, 204, tocolor(255, 255, 255, 255), 1, "default", "left", "center", false, false, true, false, false) dxDrawText(":اسم المستخدم ", 351, 219, 473, 238, tocolor(209, 178, 79, 255), 2, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(": كلمة المرور ", 350, 285, 463, 313, tocolor(209, 178, 79, 255), 2, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(296, 422, 109, 42, tocolor(216, 189, 104, 255), true) dxDrawRectangle(296, 470, 229, 41, tocolor(216, 189, 104, 255), true) dxDrawLine(285, 219, 407, 248, tocolor(255, 255, 255, 255), 1, true) dxDrawRectangle(416, 422, 109, 42, tocolor(216, 189, 104, 255), true) dxDrawLine(535, 219, 536, 540, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(285, 539, 536, 539, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 219, 537, 219, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 209, 537, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 176, 537, 176, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(537, 176, 537, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 176, 286, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawText("*سجل عشان تنحفظ ساعاتك", 293, 517, 511, 534, tocolor(199, 131, 1, 255), 1, "default-bold", "left", "top", true, false, true, false, false) dxDrawText("تذكرني", 323, 353, 418, 373, tocolor(255, 255, 255, 255), 1, "default-bold", "left", "top", false, false, true, false, false) end addEventHandler("onClientRender", root, login) function login1() dxDrawText("Login", 295, 422, 400, 461, tocolor(201, 0, 0, 255), 2, "default", "center", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, login1) function login2() dxDrawText("Login", 295, 422, 400, 461, tocolor(47, 47, 51, 255), 2, "default", "center", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, login2) function Register1() dxDrawText("Register", 425, 421, 575, 460, tocolor(47, 47, 51, 255), 2, "default", "left", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, Register1) function Register2() dxDrawText("Register", 425, 421, 575, 460, tocolor(201, 0, 0, 255), 2, "default", "left", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, Register2) function Guest1() dxDrawText(" Guest", 306, 474, 506, 506, tocolor(47, 47, 51, 255), 2, "default", "center", "center", false, true, true, false, false) end addEventHandler("onClientRender", root, Guest1) function Guest2() dxDrawText(" Guest", 306, 474, 506, 506, tocolor(201, 0, 0, 255), 2, "default", "center", "center", false, true, true, false, false) end addEventHandler("onClientRender", root, Guest2) removeEventHandler("onClientRender", root, login1) removeEventHandler("onClientRender", root, Register2) removeEventHandler("onClientRender", root, Guest2) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == onlogin ) then triggerServerEvent("onlogin",getLocalPlayer(), guiGetText(user), guiGetText(pass)) elseif ( source == onregister ) then triggerServerEvent("onregister",getLocalPlayer(), guiGetText(user), guiGetText(pass)) end end) function Show() if source == GUIEditor.button[3] then removeEventHandler("onClientRender", root, login) end end addEventHandler ("onClientGUIClick", root, Show) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == onlogin ) then addEventHandler("onClientRender", root, login1) removeEventHandler("onClientRender", root, login2) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == onlogin ) then removeEventHandler("onClientRender", root, login1) addEventHandler("onClientRender", root, login2) end end ) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == onregister ) then addEventHandler("onClientRender", root, Register2) removeEventHandler("onClientRender", root, Register1) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == onregister ) then removeEventHandler("onClientRender", root, Register2) addEventHandler("onClientRender", root, Register1) end end ) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == GUIEditor.button[3] ) then addEventHandler("onClientRender", root, Guest2) removeEventHandler("onClientRender", root, Guest1) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == GUIEditor.button[3] ) then removeEventHandler("onClientRender", root, Guest2) addEventHandler("onClientRender", root, Guest1) end end ) Link to comment
</Mr.Tn6eL> Posted May 28, 2015 Share Posted May 28, 2015 GUIEditor = { edit = {}, button = {}, staticimage = {}, checkbox = {}, } onlogin = guiCreateButton(295, 422, 107, 41, "", false) guiSetAlpha(GUIEditor.button[1], 0.00) onregister = guiCreateButton(414, 422, 108, 41, "", false) guiSetAlpha(GUIEditor.button[2], 0.00) GUIEditor.button[3] = guiCreateButton(295, 469, 228, 41, "", false) guiSetAlpha(GUIEditor.button[3], 0.00) GUIEditor.checkbox[1] = guiCreateCheckBox(306, 354, 15, 15, "تذكرني", false, false) user = guiCreateEdit(20, 29, 208, 30, "",false) pass = guiCreateEdit(20, 100, 208, 30, "",false) GUIEditor.staticimage[1] = guiCreateStaticImage(286, 219, 250, 321, "S1.png", false) guiSetAlpha(GUIEditor.staticimage[1], 0.65) GUIEditor.staticimage[2] = guiCreateStaticImage(286, 176, 250, 33, "S1.png", false) guiSetAlpha(GUIEditor.staticimage[2], 0.64) function login() dxDrawText("Login - Register v.1", 330, 176, 483, 204, tocolor(255, 255, 255, 255), 1, "default", "left", "center", false, false, true, false, false) dxDrawText(":اسم المستخدم ", 351, 219, 473, 238, tocolor(209, 178, 79, 255), 2, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(": كلمة المرور ", 350, 285, 463, 313, tocolor(209, 178, 79, 255), 2, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(296, 422, 109, 42, tocolor(216, 189, 104, 255), true) dxDrawRectangle(296, 470, 229, 41, tocolor(216, 189, 104, 255), true) dxDrawLine(285, 219, 407, 248, tocolor(255, 255, 255, 255), 1, true) dxDrawRectangle(416, 422, 109, 42, tocolor(216, 189, 104, 255), true) dxDrawLine(535, 219, 536, 540, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(285, 539, 536, 539, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 219, 537, 219, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 209, 537, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 176, 537, 176, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(537, 176, 537, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(286, 176, 286, 209, tocolor(255, 255, 255, 255), 2, true) dxDrawText("*سجل عشان تنحفظ ساعاتك", 293, 517, 511, 534, tocolor(199, 131, 1, 255), 1, "default-bold", "left", "top", true, false, true, false, false) dxDrawText("تذكرني", 323, 353, 418, 373, tocolor(255, 255, 255, 255), 1, "default-bold", "left", "top", false, false, true, false, false) end addEventHandler("onClientRender", root, login) function login1() dxDrawText("Login", 295, 422, 400, 461, tocolor(201, 0, 0, 255), 2, "default", "center", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, login1) function login2() dxDrawText("Login", 295, 422, 400, 461, tocolor(47, 47, 51, 255), 2, "default", "center", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, login2) function Register1() dxDrawText("Register", 425, 421, 575, 460, tocolor(47, 47, 51, 255), 2, "default", "left", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, Register1) function Register2() dxDrawText("Register", 425, 421, 575, 460, tocolor(201, 0, 0, 255), 2, "default", "left", "center", false, false, true, false, false) end addEventHandler("onClientRender", root, Register2) function Guest1() dxDrawText(" Guest", 306, 474, 506, 506, tocolor(47, 47, 51, 255), 2, "default", "center", "center", false, true, true, false, false) end addEventHandler("onClientRender", root, Guest1) function Guest2() dxDrawText(" Guest", 306, 474, 506, 506, tocolor(201, 0, 0, 255), 2, "default", "center", "center", false, true, true, false, false) end addEventHandler("onClientRender", root, Guest2) removeEventHandler("onClientRender", root, login1) removeEventHandler("onClientRender", root, Register2) removeEventHandler("onClientRender", root, Guest2) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == onlogin ) then triggerServerEvent("onlogin",getLocalPlayer(), guiGetText(user), guiGetText(pass)) elseif ( source == onregister ) then triggerServerEvent("onregister",getLocalPlayer(), guiGetText(user), guiGetText(pass)) end end function Show() if source == GUIEditor.button[3] then removeEventHandler("onClientRender", root, login) end end addEventHandler ("onClientGUIClick", root, Show) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == onlogin ) then addEventHandler("onClientRender", root, login1) removeEventHandler("onClientRender", root, login2) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == onlogin ) then removeEventHandler("onClientRender", root, login1) addEventHandler("onClientRender", root, login2) end end ) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == onregister ) then addEventHandler("onClientRender", root, Register2) removeEventHandler("onClientRender", root, Register1) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == onregister ) then removeEventHandler("onClientRender", root, Register2) addEventHandler("onClientRender", root, Register1) end end ) addEventHandler( "onClientMouseEnter", guiRoot, function( ) if ( source == GUIEditor.button[3] ) then addEventHandler("onClientRender", root, Guest2) removeEventHandler("onClientRender", root, Guest1) playSoundFrontEnd ( 1) end end ) addEventHandler( "onClientMouseLeave", guiRoot, function( ) if ( source == GUIEditor.button[3] ) then removeEventHandler("onClientRender", root, Guest2) addEventHandler("onClientRender", root, Guest1) end end ) Link to comment
i S6O Posted May 29, 2015 Share Posted May 29, 2015 ابو عابد ترا كله حقك مو الي ابيه راجع حقي الكود زين هنا بس اسوي لك مثال موب اسويه لك كامل * Link to comment
[iMr]-W[i]Fi,.! Posted May 29, 2015 Author Share Posted May 29, 2015 مشكورينن ~! طلب اخخر ابي فنكشنات تذكرني ايي يوم يحط صح على checkbox وخرج ودخل يجيه حسابه ورمززه وسلام عليكم Link to comment
TAPL Posted May 29, 2015 Share Posted May 29, 2015 مشكورينن ~!طلب اخخر ابي فنكشنات تذكرني ايي يوم يحط صح على checkbox وخرج ودخل يجيه حسابه ورمززه وسلام عليكم https://wiki.multitheftauto.com/wiki/Client_Scripting_Functions#XML_functions Link to comment
[iMr]-W[i]Fi,.! Posted June 5, 2015 Author Share Posted June 5, 2015 تمت الافادة يغلق الموضوع من قبل تنطيل ابو عابد كلاسيك وليد اما تابل شواكي مستحيل افهم اكوادكم لكن مشكورين Link to comment
Simple. Posted June 5, 2015 Share Posted June 5, 2015 onClientGUIClick -- Event xmlLoadFile xmlCreateFile xmlNodeSetValue xmlCreateChild xmlNodeSetAttribute xmlSaveFile xmlUnloadFile onClientResourceStart -- Event xmlLoadFile xmlFindChild xmlNodeGetValue Link to comment
[iMr]-W[i]Fi,.! Posted June 5, 2015 Author Share Posted June 5, 2015 ^^ اخوي انا فاشل في ذي الاشياء مستحيل اتعلمها ما ابي اتعبك لكن مشكوور ! Link to comment
[iMr]-W[i]Fi,.! Posted June 5, 2015 Author Share Posted June 5, 2015 طيب ما ابي اتعبك عطني امثلةة لكل واحد الويكي ما افهمله هاذا الي بقدر علية Link to comment
[iMr]-W[i]Fi,.! Posted June 6, 2015 Author Share Posted June 6, 2015 عطني مثال او اشرحلي xmlFindChild xmlNodeSetValue xmlCreateChild xmlNodeSetAttribute وكيف استعملها مع checkbox 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