Jump to content

Edit


Recommended Posts

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 by slapz0r
Link to comment

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

  • Like 1
Link to comment
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...