MajdMTA Posted February 15, 2016 Share Posted February 15, 2016 (edited) Solved, thanks @kariiim Edited February 15, 2016 by Guest Link to comment
MajdMTA Posted February 15, 2016 Author Share Posted February 15, 2016 Already.. it's bugged. Can you do it.. all? man.. you didn't understand me Link to comment
KariiiM Posted February 15, 2016 Share 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 Link to comment
MajdMTA Posted February 15, 2016 Author Share Posted February 15, 2016 (edited) solved. Edited February 15, 2016 by Guest Link to comment
MajdMTA Posted February 15, 2016 Author Share Posted February 15, 2016 Did you correct it @KariiiM ? sorry for double post. Link to comment
KariiiM Posted February 15, 2016 Share 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. Link to comment
MajdMTA Posted February 15, 2016 Author Share 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. Link to comment
KariiiM Posted February 15, 2016 Share Posted February 15, 2016 Dude show the full code, if you automaticly posted what I have edited to your notepad, it won't work. Link to comment
MajdMTA Posted February 15, 2016 Author Share 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 Link to comment
KariiiM Posted February 15, 2016 Share Posted February 15, 2016 Is there's a button to click on? Link to comment
MajdMTA Posted February 15, 2016 Author Share Posted February 15, 2016 yes, registerBut = guiCreateButton( 298, 570, 127, 42, "Create my account", false, regWnd) Link to comment
KariiiM Posted February 15, 2016 Share 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) Link to comment
MajdMTA Posted February 15, 2016 Author Share 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" ... Link to comment
KariiiM Posted February 15, 2016 Share 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] Link to comment
KariiiM Posted February 15, 2016 Share 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) Link to comment
MajdMTA Posted February 15, 2016 Author Share Posted February 15, 2016 Thanks for you'r hard work! worked. Link to comment
KariiiM Posted February 15, 2016 Share Posted February 15, 2016 Thanks for you'r hard work! worked. You're welcome. 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