fairyoggy Posted June 20, 2019 Share Posted June 20, 2019 Hello! how to write correctly? If in edit1 write text "123" then edit 2 will be "321" I can not solve such an easy task. Horror Link to comment
fairyoggy Posted June 20, 2019 Author Share Posted June 20, 2019 (edited) The task has changed a bit if (DGS:dgsGetText(PasseditBox) == "444") then DGS:dgsSetText(LogineditBox , "321") else DGS:dgsSetText(LogineditBox , "") I did so what if I type in PasseditBox = "444" then LogineditBox = "321" How to make it so that if edit 1 = edit 2 then text will be "321" in edit3 Edit 1 = PasseditBox Edit 2 = LogineditBox Edit 3 = Hello Edited June 20, 2019 by slapz0r Link to comment
salh Posted June 20, 2019 Share Posted June 20, 2019 try if (DGS:dgsGetText(PasseditBox) == "444") then DGS:dgsSetText(LogineditBox , "321") elseif (DGS:dgsGetText(PasseditBox) == "321") DGS:dgsSetText(Hello , "321") oh no use this GUIEditor = { button = {}, window = {}, edit = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 613) / 2, (screenH - 326) / 2, 613, 326, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(19, 42, 277, 96, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(313, 42, 277, 96, "", false, GUIEditor.window[1]) GUIEditor.edit[3] = guiCreateEdit(168, 148, 277, 96, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(10, 263, 593, 49, "Test", false, GUIEditor.window[1]) function salh ( button ) if button == "left" then if guiGetText(GUIEditor.edit[1]) == "123" then guiSetText(GUIEditor.edit[2], "321") end if guiGetText(GUIEditor.edit[2]) == "321" then guiSetText(GUIEditor.edit[3], "321") end end end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], salh, false ) use the click function 1 Link to comment
fairyoggy Posted June 20, 2019 Author Share Posted June 20, 2019 21 minutes ago, salh said: try if (DGS:dgsGetText(PasseditBox) == "444") then DGS:dgsSetText(LogineditBox , "321") elseif (DGS:dgsGetText(PasseditBox) == "321") DGS:dgsSetText(Hello , "321") oh no use this GUIEditor = { button = {}, window = {}, edit = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 613) / 2, (screenH - 326) / 2, 613, 326, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(19, 42, 277, 96, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(313, 42, 277, 96, "", false, GUIEditor.window[1]) GUIEditor.edit[3] = guiCreateEdit(168, 148, 277, 96, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(10, 263, 593, 49, "Test", false, GUIEditor.window[1]) function salh ( button ) if button == "left" then if guiGetText(GUIEditor.edit[1]) == "123" then guiSetText(GUIEditor.edit[2], "321") end if guiGetText(GUIEditor.edit[2]) == "321" then guiSetText(GUIEditor.edit[3], "321") end end end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], salh, false ) use the click function I decided it is much easier, but thanks for the answer! 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