MajdMTA Posted February 15, 2016 Posted February 15, 2016 (edited) Solved, thanks @kariiim Edited February 15, 2016 by Guest
MajdMTA Posted February 15, 2016 Author Posted February 15, 2016 Already.. it's bugged. Can you do it.. all? man.. you didn't understand me
KariiiM Posted February 15, 2016 Posted February 15, 2016 Already.. it's bugged. Can you do it.. all? man.. you didn't understand me Ah, so post what you have tried and I'll correct it
MajdMTA Posted February 15, 2016 Author Posted February 15, 2016 (edited) solved. Edited February 15, 2016 by Guest
MajdMTA Posted February 15, 2016 Author Posted February 15, 2016 Did you correct it @KariiiM ? sorry for double post.
KariiiM Posted February 15, 2016 Posted February 15, 2016 Simply, just check if the editbox is not empty that's mean it has some characters onto it. Try that and tell me the result. function nameLabel() local text = guiGetText(GUIEditor.edit[1]) if (text ~= "") then guiSetText(GUIEditor.label[2], "Available name!") end end Good luck.
MajdMTA Posted February 15, 2016 Author Posted February 15, 2016 Simply, just check if the editbox is not empty that's mean it has some characters onto it.Try that and tell me the result. function nameLabel() local text = guiGetText(GUIEditor.edit[1]) if (text ~= "") then guiSetText(GUIEditor.label[2], "Available name!") end end Good luck. It's didn't work, I tried debugscript, No errors.
KariiiM Posted February 15, 2016 Posted February 15, 2016 Dude show the full code, if you automaticly posted what I have edited to your notepad, it won't work.
MajdMTA Posted February 15, 2016 Author Posted February 15, 2016 username = guiCreateEdit(13, 316, 223, 33, "", false, regWindow) nameLabel = guiCreateLabel(292, 42, 115, 25, "Enter a name", false, regWindow) guiSetFont(nameLabel, "clear-normal") guiLabelSetColor(nameLabel, 247, 0, 0) function nameLabel() local text = guiGetText(username) if (text ~= "") then guiSetText(nameLabel, "Available name!") end end
MajdMTA Posted February 15, 2016 Author Posted February 15, 2016 yes, registerBut = guiCreateButton( 298, 570, 127, 42, "Create my account", false, regWnd)
KariiiM Posted February 15, 2016 Posted February 15, 2016 Here you go, local registerBut = guiCreateButton( 298, 570, 127, 42, "Create my account", false, regWnd) local username = guiCreateEdit(13, 316, 223, 33, "", false, regWindow) local nameLabel = guiCreateLabel(292, 42, 115, 25, "Enter a name", false, regWindow) guiSetFont(nameLabel, "clear-normal") guiLabelSetColor(nameLabel, 247, 0, 0) addEventHandler("onClientGUIClick", guiRoot, function () if (source == registerBut) then local text = guiGetText(username) if (text ~= "") then guiSetText(nameLabel, "Available name!") end end end)
MajdMTA Posted February 15, 2016 Author Posted February 15, 2016 Here you go, local registerBut = guiCreateButton( 298, 570, 127, 42, "Create my account", false, regWnd) local username = guiCreateEdit(13, 316, 223, 33, "", false, regWindow) local nameLabel = guiCreateLabel(292, 42, 115, 25, "Enter a name", false, regWindow) guiSetFont(nameLabel, "clear-normal") guiLabelSetColor(nameLabel, 247, 0, 0) addEventHandler("onClientGUIClick", guiRoot, function () if (source == registerBut) then local text = guiGetText(username) if (text ~= "") then guiSetText(nameLabel, "Available name!") end end end) It's worked........... but i need it if he fill the edit not if he click on "register button" ...
KariiiM Posted February 15, 2016 Posted February 15, 2016 Try that, [lua]local registerBut = guiCreateButton( 298, 570, 127, 42, "Create my account", false, regWnd) local username = guiCreateEdit(13, 316, 223, 33, "", false, regWindow) local nameLabel = guiCreateLabel(292, 42, 115, 25, "Enter a name", false, regWindow) guiSetFont(nameLabel, "clear-normal") guiLabelSetColor(nameLabel, 247, 0, 0) addEventHandler("onClientGUIChanged", guiRoot, function () local text = guiGetText(username) if (text ~= "") then guiSetText(nameLabel, "Available name!") end end) [/lua]
KariiiM Posted February 15, 2016 Posted February 15, 2016 Try that, local registerBut = guiCreateButton( 298, 570, 127, 42, "Create my account", false, regWnd) local username = guiCreateEdit(13, 316, 223, 33, "", false, regWindow) local nameLabel = guiCreateLabel(292, 42, 115, 25, "Enter a name", false, regWindow) guiSetFont(nameLabel, "clear-normal") guiLabelSetColor(nameLabel, 247, 0, 0) addEventHandler("onClientGUIChanged", guiRoot, function () local text = guiGetText(username) if (text ~= "") then guiSetText(nameLabel, "Available name!") end end)
KariiiM Posted February 15, 2016 Posted February 15, 2016 Thanks for you'r hard work! worked. You're welcome.
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