Adham Posted March 4, 2016 Share Posted March 4, 2016 السلام عليكم عملت لوحه تسجيل الخطاء فيها اللما اجي اشغل المود يجي علي طول ولما ركبت الكود بتاع الميجيش اللوحه في وجهي اللوحه ما تفتح خالص وخطاء تاني لازم اضعط ف1 عشان اعمل login وكدا و الخطاء التالت حاطط كل الاكواد لما اجي اعمل Login ما يعمل او greate Account ما يعمل -- client. local sx, sy = guiGetScreenSize() function centerTheGUI( guiElement ) local width, height = guiGetSize( guiElement, false ) local x, y = sx / 2 - width / 2, sy / 2 - height / 2 guiSetPosition( guiElement, x, y, false ) end GUIEditor = { memo = {}, button = {}, window = {}, tab = {}, checkbox = {}, label = {}, tabpanel = {}, } GUIEditor.window[1] = guiCreateWindow(114, 60, 500, 468, "CPT Zombie / The Walking Dead v2", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.96) GUIEditor.label[2] = guiCreateLabel(19, 41, 112, 44, "Username:", false, GUIEditor.window[1]) GUIEditor.memo[4] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) GUIEditor.memo[6] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) GUIEditor.memo[7] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) GUIEditor.memo[8] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) GUIEditor.memo[9] = guiCreateMemo(84, 35, 170, 32, "", false, GUIEditor.window[1]) GUIEditor.memo[10] = guiCreateMemo(83, 75, 172, 33, "", false, GUIEditor.window[1]) GUIEditor.label[4] = guiCreateLabel(19, 85, 64, 16, "Password:", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(53, 122, 114, 36, "Login", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(195, 122, 114, 36, "Creat an Account", false, GUIEditor.window[1]) GUIEditor.button[10] = guiCreateButton(336, 122, 114, 36, "Forgot Password?", false, GUIEditor.window[1]) GUIEditor.checkbox[5] = guiCreateCheckBox(272, 45, 165, 17, "Remember Username", true, false, GUIEditor.window[1]) GUIEditor.checkbox[7] = guiCreateCheckBox(272, 81, 165, 17, "Remember Password", true, false, GUIEditor.window[1]) GUIEditor.label[5] = guiCreateLabel(145, 180, 308, 19, "Welcome to CPT! Play fair, have fun.", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[5], 9, 104, 169) GUIEditor.tabpanel[4] = guiCreateTabPanel(9, 211, 482, 248, false, GUIEditor.window[1]) GUIEditor.tab[6] = guiCreateTab("Updates", GUIEditor.tabpanel[4]) GUIEditor.memo[19] = guiCreateMemo(1, 2, 479, 220, "The opening of the server on Friday Programming (Hardgamer+Fawad)\nMaud was making weapons relased 3/3/2016 v2 \nTo buy zones talk Hardgamer in skype CPT Zombie Go to skype and payment method onecard .\nit has been making the beginnign 2/3/2016 v2 . \nmaking auto shop v2 by (Fawad) . \nmod was making click x by Hardgamer. \n", false, GUIEditor.tab[6]) GUIEditor.tab[7] = guiCreateTab("Todays Stats", GUIEditor.tabpanel[4]) GUIEditor.memo[23] = guiCreateMemo(1, 2, 479, 220, "1 - Not to sabotage the player\n2 - Do not try hack thie server is protected \n3 - Do not try to enter any headquatres For not looged in preison for 4 hours \n4 - Not insulting players \n5 - Emphasis will be from him or give money to one's predcessor and his friend did not attribut you screenshot chaat and send to skype CPT Zombie if you did not return the money .", false, GUIEditor.tab[7]) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[3] then local uss,passs = guiGetText(GUIEditor.edit[1]),guiGetText(GUIEditor.edit[2]) triggerServerEvent("onLogin",localPlayer,uss,passs) elseif source == GUIEditor.button[4] then local uss,passs = guiGetText(GUIEditor.edit[1]),guiGetText(GUIEditor.edit[2]) triggerServerEvent("onReg",localPlayer,uss,passs) end end ) addEvent("Hidewindow",true) addEventHandler("Hidewindow",root, function () guiSetVisible(GUIEditor.window[1],false) showCursor(false) showChat(true) fadeCamera(true,5) setCameraTarget (localPlayer) end ) addEvent("show",true) addEventHandler("show",root, function () guiSetVisible(GUIEditor.window[1],true) showCursor(true) showChat(true) end ) server - addEvent("onLogin", true) addEventHandler("onLogin",root, function (user, pass) local account = getAccount ( user, pass ) if ( account ~= true ) then local log = logIn (source,account,pass) if log then outputChatBox ( "You Logged in Sucessfuly!", source, 255, 255, 0 , true ) triggerClientEvent (source, "Hidewindow", source) else outputChatBox ( "Login Error!", source, 255, 0, 0 ) end else outputChatBox ( "Wrong username or password!", source, 255, 0, 0 ) end end ) -- addEvent("onReg", true) addEventHandler("onReg",root, function (user, pass) if not getAccount (user,pass) then local acc = addAccount (user,pass) if acc then local account = getAccount ( user, pass ) outputChatBox ("You've registered successfully!",source,0,255,0) else outputChatBox ("Error creating account !",source,255,0,0) end else outputChatBox ("This account is already exists !",source,255,0,0) end end ) addEventHandler ("onPlayerJoin",root, function () l = source repeat until setTimer(function() triggerClientEvent (l,"show",l) end,2000,1) end ) Link to comment
Adham Posted March 4, 2016 Author Share Posted March 4, 2016 ولما يضعط . "Remember Username يتسجل اسم الحساب و لما يضعط "Remember Password يتسجل اسم البساورد Link to comment
nxFairlywell Posted March 4, 2016 Share Posted March 4, 2016 سطر 5 سيرفر if ( account ~= true ) then المفروض تتحقق ان الحساب صحيح وليس المفروض ان تتحقق ان الحساب خاطئ معنى التحقق في هذا السطر هو اذا كان الحساب ليس صحيحا حطه كذا وجرب if account then Link to comment
Adham Posted March 4, 2016 Author Share Posted March 4, 2016 طيب تعديل اللوحه client و سرفر ؟؟ Link to comment
YourMind Posted March 4, 2016 Share Posted March 4, 2016 --client local sx, sy = guiGetScreenSize() function centerTheGUI( guiElement ) local width, height = guiGetSize( guiElement, false ) local x, y = sx / 2 - width / 2, sy / 2 - height / 2 guiSetPosition( guiElement, x, y, false ) end GUIEditor = { memo = {}, button = {}, window = {}, tab = {}, checkbox = {}, label = {}, tabpanel = {}, } GUIEditor.window[1] = guiCreateWindow(114, 60, 500, 468, "CPT Zombie / The Walking Dead v2", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible (GUIEditor.window[1],false) guiSetAlpha(GUIEditor.window[1], 0.96) centerTheGUI( GUIEditor.window[1] ) GUIEditor.label[2] = guiCreateLabel(19, 41, 112, 44, "Username:", false, GUIEditor.window[1]) GUIEditor.memo[4] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) GUIEditor.memo[6] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) GUIEditor.memo[7] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) GUIEditor.memo[8] = guiCreateMemo(84, 35, 170, 33, "", false, GUIEditor.window[1]) GUIEditor.memo[9] = guiCreateMemo(84, 35, 170, 32, "", false, GUIEditor.window[1]) GUIEditor.memo[10] = guiCreateMemo(83, 75, 172, 33, "", false, GUIEditor.window[1]) GUIEditor.label[4] = guiCreateLabel(19, 85, 64, 16, "Password:", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(53, 122, 114, 36, "Login", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(195, 122, 114, 36, "Create an Account", false, GUIEditor.window[1]) GUIEditor.button[10] = guiCreateButton(336, 122, 114, 36, "Forgot Password?", false, GUIEditor.window[1]) GUIEditor.checkbox[5] = guiCreateCheckBox(272, 45, 165, 17, "Remember Username", true, false, GUIEditor.window[1]) GUIEditor.checkbox[7] = guiCreateCheckBox(272, 81, 165, 17, "Remember Password", true, false, GUIEditor.window[1]) GUIEditor.label[5] = guiCreateLabel(145, 180, 308, 19, "Welcome to CPT! Play fair, have fun.", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[5], 9, 104, 169) GUIEditor.tabpanel[4] = guiCreateTabPanel(9, 211, 482, 248, false, GUIEditor.window[1]) GUIEditor.tab[6] = guiCreateTab("Updates", GUIEditor.tabpanel[4]) GUIEditor.memo[19] = guiCreateMemo(1, 2, 479, 220, "The opening of the server on Friday Programming (Hardgamer+Fawad)\nMaud was making weapons relased 3/3/2016 v2 \nTo buy zones talk Hardgamer in skype CPT Zombie Go to skype and payment method onecard .\nit has been making the beginnign 2/3/2016 v2 . \nmaking auto shop v2 by (Fawad) . \nmod was making click x by Hardgamer. \n", false, GUIEditor.tab[6]) GUIEditor.tab[7] = guiCreateTab("Todays Stats", GUIEditor.tabpanel[4]) GUIEditor.memo[23] = guiCreateMemo(1, 2, 479, 220, "1 - Not to sabotage the player\n2 - Do not try hack thie server is protected \n3 - Do not try to enter any headquatres For not looged in preison for 4 hours \n4 - Not insulting players \n5 - Emphasis will be from him or give money to one's predcessor and his friend did not attribut you screenshot chaat and send to skype CPT Zombie if you did not return the money .", false, GUIEditor.tab[7]) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[3] then local uss,passs = guiGetText (GUIEditor.memo[9]) , guiGetText (GUIEditor.memo[10]) triggerServerEvent("onLogin",localPlayer,uss,passs) elseif source == GUIEditor.button[4] then local uss,passs = guiGetText (GUIEditor.memo[9]) , guiGetText (GUIEditor.memo[10]) triggerServerEvent("onReg",localPlayer,uss,passs) end end ) addEvent("Hidewindow",true) addEventHandler("Hidewindow",root, function () guiSetVisible(GUIEditor.window[1],false) showCursor(false) showChat(true) fadeCamera(true,5) setCameraTarget (localPlayer) end ) addEvent("show",true) addEventHandler("show",root, function () guiSetVisible(GUIEditor.window[1],true) showCursor(true) showChat(true) end ) --server addEvent("onLogin", true) addEventHandler("onLogin",root, function (user, pass) local account = getAccount ( user, pass ) if account then local log = logIn (source,account,pass) if log then outputChatBox ( "You Logged in Sucessfuly!", source, 255, 255, 0 , true ) triggerClientEvent (source, "Hidewindow", source) else outputChatBox ( "Login Error!", source, 255, 0, 0 ) end else outputChatBox ( "Wrong username or password!", source, 255, 0, 0 ) end end ) -- addEvent("onReg", true) addEventHandler("onReg",root, function (user, pass) if not getAccount (user,pass) then local acc = addAccount (user,pass) if acc then local account = getAccount ( user, pass ) outputChatBox ("You've registered successfully!",source,0,255,0) else outputChatBox ("Error creating account !",source,255,0,0) end else outputChatBox ("This account is already exists !",source,255,0,0) end end ) addEventHandler ("onPlayerJoin",root, function () l = source repeat until setTimer(function() triggerClientEvent (l,"show",l) end,2000,1) end ) Link to comment
Adham Posted March 4, 2016 Author Share Posted March 4, 2016 ابي كود اليضعط مثلن عامل Button اسمه X اليضعط علي X يرجع علي اللوحه تاني # Link to comment
YourMind Posted March 4, 2016 Share Posted March 4, 2016 ابي كود اليضعط مثلن عامل Button اسمه X اليضعط علي X يرجع علي اللوحه تاني # ممكن توضح اكتر؟ تقصد عايز بوتن يغلق النافذة ؟ Link to comment
Adham Posted March 4, 2016 Author Share Posted March 4, 2016 اليضعط علي مثال انا عامل button اسمه X عاوز الليضعط علي X يرجع للوحه الاصليه تاني Link to comment
YourMind Posted March 4, 2016 Share Posted March 4, 2016 اليضعط عليمثال انا عامل button اسمه X عاوز الليضعط علي X يرجع للوحه الاصليه تاني ايه هي اللوحة الاصلية ؟ تقصد اللعبة ؟ Link to comment
Adham Posted March 4, 2016 Author Share Posted March 4, 2016 مثلن انا عامل لوحه عادي و عامل button اسمه Warp الويضعط warp يروح لوحه تانيه ونا عملها طيب .. وفي اللوحه التاينه button اسمه X عاوز اليضعط X برجع للوحه الاوله# Link to comment
YourMind Posted March 4, 2016 Share Posted March 4, 2016 مثلن انا عامل لوحه عاديو عامل button اسمه Warp الويضعط warp يروح لوحه تانيه ونا عملها طيب .. وفي اللوحه التاينه button اسمه X عاوز اليضعط X برجع للوحه الاوله# استخدم guiSetVisible Link to comment
Ja[B]er[X]Pro Posted March 4, 2016 Share Posted March 4, 2016 addEventHandler("onClientGUIClick",root, function() if source == الزر then guiSetVisible(اللوحة التي بها الزر ,false) guiSetVisible( اللوحة الاصلية ,true) end end) 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