~Mr.Hassan Posted August 10, 2015 Share Posted August 10, 2015 السلام عليكم عندي مشكله بلوحه التسجيل شوفو دي بق شو يقلي واكواد الوحه كلينت GUIEditor = { button = {}, edit = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(24, 191, 121, 50, "", false) guiSetAlpha(GUIEditor.button[1], 0.00) GUIEditor.button[2] = guiCreateButton(210, 188, 121, 50, "", false) guiSetAlpha(GUIEditor.button[2], 0.00) GUIEditor.memo[1] = guiCreateMemo(622, 0, 178, 401, "Wellcome To The Server ..\n\nاهلا بكم في السيرفر\n\n\n\n\nنشكرك على زياره سرفيرنا ", false) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.edit[1] = guiCreateEdit(145, 37, 144, 23, "", false) GUIEditor.edit[2] = guiCreateEdit(149, 116, 144, 23, "", false) end ) function Dx() dxDrawImage(0, 0, 800, 600, "ddsda.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("UserName :", 20 - 1, 30 - 1, 155 - 1, 70 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 + 1, 30 - 1, 155 + 1, 70 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 - 1, 30 + 1, 155 - 1, 70 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 + 1, 30 + 1, 155 + 1, 70 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20, 30, 155, 70, tocolor(186, 55, 247, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("PassWord :", 20, 109, 155, 149, tocolor(214, 248, 55, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawImage(21, 188, 124, 58, "black-37291_640.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(207, 188, 124, 58, "black-37291_640.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Login", 23 - 1, 189 - 1, 145 - 1, 246 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 + 1, 189 - 1, 145 + 1, 246 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 - 1, 189 + 1, 145 - 1, 246 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 + 1, 189 + 1, 145 + 1, 246 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23, 189, 145, 246, tocolor(186, 55, 247, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Register", 209, 188, 331, 245, tocolor(186, 55, 247, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) end -------------------------------- addEventHandler("onClientGUIClick",root, function () local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) if ( source == GUIEditor_Button[1] ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onLogin",localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onRegister",localPlayer,user,pass) end end end ) ----------------------------------------------- bindKey ( "F3", "down", function () if removeEventHandler("onClientRender",root,Dx) then removeEventHandler("onClientRender",root,Dx) showCursor(false) outputChatBox ( "The Panel Now Is Close !!", 255, 255, 255, true ) else addEventHandler("onClientRender",root,Dx) showCursor(true) outputChatBox ( "The Panel Now Is Open !!", 255, 255, 255, true ) end end) سيرفر addEvent ( "onLogin", true ) addEventHandler ( "onLogin", root, function (player, user, pass) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "HideTheWindow", player ) else outputChatBox ( "خطا !!", player, 255, 255, 0 ) end else outputChatBox ( "خطا اسم الحساب والباسورد", player, 255, 255, 0 ) end end ) addEvent ( "onRegister", true ) addEventHandler ( "onRegister", root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) setElementModel ( player, 287 ) triggerClientEvent ( player, "HideTheWindow", player ) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", player, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "HideTheWindow", player ) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end ) Link to comment
The Killer Posted August 10, 2015 Share Posted August 10, 2015 GUIEditor = { button = {}, edit = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(24, 191, 121, 50, "", false) guiSetAlpha(GUIEditor.button[1], 0.00) GUIEditor.button[2] = guiCreateButton(210, 188, 121, 50, "", false) guiSetAlpha(GUIEditor.button[2], 0.00) GUIEditor.memo[1] = guiCreateMemo(622, 0, 178, 401, "Wellcome To The Server ..\n\nاهلا بكم في السيرفر\n\n\n\n\nنشكرك على زياره سرفيرنا ", false) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.edit[1] = guiCreateEdit(145, 37, 144, 23, "", false) GUIEditor.edit[2] = guiCreateEdit(149, 116, 144, 23, "", false) end ) function Dx() dxDrawImage(0, 0, 800, 600, "ddsda.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("UserName :", 20 - 1, 30 - 1, 155 - 1, 70 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 + 1, 30 - 1, 155 + 1, 70 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 - 1, 30 + 1, 155 - 1, 70 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 + 1, 30 + 1, 155 + 1, 70 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20, 30, 155, 70, tocolor(186, 55, 247, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("PassWord :", 20, 109, 155, 149, tocolor(214, 248, 55, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawImage(21, 188, 124, 58, "black-37291_640.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(207, 188, 124, 58, "black-37291_640.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Login", 23 - 1, 189 - 1, 145 - 1, 246 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 + 1, 189 - 1, 145 + 1, 246 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 - 1, 189 + 1, 145 - 1, 246 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 + 1, 189 + 1, 145 + 1, 246 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23, 189, 145, 246, tocolor(186, 55, 247, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Register", 209, 188, 331, 245, tocolor(186, 55, 247, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) end -------------------------------- addEventHandler("onClientGUIClick",root, function () local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) if ( source == GUIEditor.button[1] ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onLogin",localPlayer,user,pass) end elseif ( source == GUIEditor.button[2] ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onRegister",localPlayer,user,pass) end end end ) ----------------------------------------------- function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end bindKey ( "F3", "down", function () if isEventHandlerAdded ("onClientRender", root, Dx) then removeEventHandler("onClientRender",root,Dx) showCursor(false) outputChatBox ( "The Panel Now Is Close !!", 255, 255, 255, true ) else addEventHandler("onClientRender",root,Dx) showCursor(true) outputChatBox ( "The Panel Now Is Open !!", 255, 255, 255, true ) end end) Link to comment
~Mr.Hassan Posted August 10, 2015 Author Share Posted August 10, 2015 GUIEditor = { button = {}, edit = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(24, 191, 121, 50, "", false) guiSetAlpha(GUIEditor.button[1], 0.00) GUIEditor.button[2] = guiCreateButton(210, 188, 121, 50, "", false) guiSetAlpha(GUIEditor.button[2], 0.00) GUIEditor.memo[1] = guiCreateMemo(622, 0, 178, 401, "Wellcome To The Server ..\n\nاهلا بكم في السيرفر\n\n\n\n\nنشكرك على زياره سرفيرنا ", false) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.edit[1] = guiCreateEdit(145, 37, 144, 23, "", false) GUIEditor.edit[2] = guiCreateEdit(149, 116, 144, 23, "", false) end ) function Dx() dxDrawImage(0, 0, 800, 600, "ddsda.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("UserName :", 20 - 1, 30 - 1, 155 - 1, 70 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 + 1, 30 - 1, 155 + 1, 70 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 - 1, 30 + 1, 155 - 1, 70 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20 + 1, 30 + 1, 155 + 1, 70 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("UserName :", 20, 30, 155, 70, tocolor(186, 55, 247, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawText("PassWord :", 20, 109, 155, 149, tocolor(214, 248, 55, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) dxDrawImage(21, 188, 124, 58, "black-37291_640.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(207, 188, 124, 58, "black-37291_640.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Login", 23 - 1, 189 - 1, 145 - 1, 246 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 + 1, 189 - 1, 145 + 1, 246 - 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 - 1, 189 + 1, 145 - 1, 246 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23 + 1, 189 + 1, 145 + 1, 246 + 1, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Login", 23, 189, 145, 246, tocolor(186, 55, 247, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) dxDrawText("Register", 209, 188, 331, 245, tocolor(186, 55, 247, 255), 1.00, "pricedown", "center", "center", true, true, false, true, false) end -------------------------------- addEventHandler("onClientGUIClick",root, function () local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) if ( source == GUIEditor.button[1] ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onLogin",localPlayer,user,pass) end elseif ( source == GUIEditor.button[2] ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("onRegister",localPlayer,user,pass) end end end ) ----------------------------------------------- function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end bindKey ( "F3", "down", function () if isEventHandlerAdded ("onClientRender", root, Dx) then removeEventHandler("onClientRender",root,Dx) showCursor(false) outputChatBox ( "The Panel Now Is Close !!", 255, 255, 255, true ) else addEventHandler("onClientRender",root,Dx) showCursor(true) outputChatBox ( "The Panel Now Is Open !!", 255, 255, 255, true ) end end) شكرا بس المشاكل الحين من السيرفر Link to comment
The Killer Posted August 10, 2015 Share Posted August 10, 2015 addEvent ("onLogin", true) addEventHandler ("onLogin", root, function (user, pass) local account = getAccount (user, pass) if (account) then if logIn (source, account, pass) then outputChatBox ("You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", source, 255, 255, 0, true) setElementModel (source, 287) triggerClientEvent (source, "HideTheWindow", source) else outputChatBox ("خطا !!", source, 255, 255, 0) end else outputChatBox ("خطا اسم الحساب والباسورد", source, 255, 255, 0) end end ) addEvent ("onRegister", true) addEventHandler ("onRegister", root, function (user, pass) if not getAccount (user) then local account = addAccount (user, pass) if (account) then if logIn (source, user, pass) then outputChatBox ("You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", source, 255, 255, 0) outputChatBox ("Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", source, 255, 255, 0 , true) setElementModel (source, 287) triggerClientEvent ( source, "HideTheWindow", source ) else outputChatBox ("Register/Login error!", source, 255, 255, 0) end else outputChatBox ("Account name is already exist.", source, 255, 0, 0) end end end ) Link to comment
~Mr.Hassan Posted August 10, 2015 Author Share Posted August 10, 2015 addEvent ("onLogin", true) addEventHandler ("onLogin", root, function (user, pass) local account = getAccount (user, pass) if (account) then if logIn (source, account, pass) then outputChatBox ("You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", source, 255, 255, 0, true) setElementModel (source, 287) triggerClientEvent (source, "HideTheWindow", source) else outputChatBox ("خطا !!", source, 255, 255, 0) end else outputChatBox ("خطا اسم الحساب والباسورد", source, 255, 255, 0) end end ) addEvent ("onRegister", true) addEventHandler ("onRegister", root, function (user, pass) if not getAccount (user) then local account = addAccount (user, pass) if (account) then if logIn (source, user, pass) then outputChatBox ("You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", source, 255, 255, 0) outputChatBox ("Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", source, 255, 255, 0 , true) setElementModel (source, 287) triggerClientEvent ( source, "HideTheWindow", source ) else outputChatBox ("Register/Login error!", source, 255, 255, 0) end else outputChatBox ("Account name is already exist.", source, 255, 0, 0) end end end ) يسلمو تمت الافاده بس عندي مشكله ابيها اول ما يسجل دخوله بحطه وين للحدث ؟؟ Link to comment
iMr.SFA7 Posted August 10, 2015 Share Posted August 10, 2015 حط الشيء الي يبيه بعد ما يسجل في السيرفر بعد سطر 7 Link to comment
~Mr.Hassan Posted August 10, 2015 Author Share Posted August 10, 2015 ممكن تقلي كيف اعمله اول ما لاعب يدخل ؟ Link to comment
The Killer Posted August 10, 2015 Share Posted August 10, 2015 وش تبي تسوي بعد ما اللاعب يسجل دخوله ؟ Link to comment
~Mr.Hassan Posted August 10, 2015 Author Share Posted August 10, 2015 ابي تطلعله الوحه Link to comment
~Mr.Hassan Posted August 10, 2015 Author Share Posted August 10, 2015 ملاحظه زر register مدري ليه ما اشتغل ؟؟ Link to comment
iMr.SFA7 Posted August 10, 2015 Share Posted August 10, 2015 بعد سطر 7 بالسيرفر سوي ترايقر للكلنت وسوي أظهار triggerClientEvent guiSetVisible Link to comment
~Mr.Hassan Posted August 10, 2015 Author Share Posted August 10, 2015 بعد سطر 7 بالسيرفر سوي ترايقر للكلنت وسوي أظهار triggerClientEvent guiSetVisible الكلنت يصير كذا ؟ function ss() guiSetVisible ( dx , true ) outputChatBox ( "الرجاء تسجيل الدخول ايها الاعب ",..getPlayerName, 255, 255, 255, true ) if ( account ~= true) then guiSetVisible ( dx , false ) end end addEventHandler("onClientPlayerJoin", getRootElement(), ss) Link to comment
iMr.SFA7 Posted August 10, 2015 Share Posted August 10, 2015 خطأ xx الحدث خطأ ما اغلقت الفنكشن والتحقق ايش تبي تسوي ؟ 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