JeViCo Posted April 12, 2018 Share Posted April 12, 2018 Hello everyone! i'm making a login panel and met a little(maybe not) problem. All following letters appear on a new line. Code: addEventHandler("onClientCharacter", root, function(key) if guiGetVisible(backimg) then if string.match(key, '%a') or string.match(key, '%d') then if edit_l then local text = guiGetText(edit_login) --outputChatBox(text) --outputChatBox(key) guiSetText(edit_login,text..key) elseif edit_p then local text = guiGetText(edit_pass) guiSetText(edit_pass,text..key) elseif edit_conf_p then local text = guiGetText(edit_conf_pass) guiSetText(edit_conf_pass,text..key) end end end end) Link to comment
PSWGM9100 Posted April 29, 2018 Share Posted April 29, 2018 Maybe use this? https://wiki.multitheftauto.com/wiki/GuiCreateEdit Link to comment
JeViCo Posted April 30, 2018 Author Share Posted April 30, 2018 11 hours ago, PSWGM9100 said: Maybe use this? https://wiki.multitheftauto.com/wiki/GuiCreateEdit Maybe. But I need a transparent editbox to see only words without vertical blinking line and editbox background Link to comment
PSWGM9100 Posted April 30, 2018 Share Posted April 30, 2018 Try this: https://wiki.multitheftauto.com/wiki/GuiSetAlpha Link to comment
JeViCo Posted April 30, 2018 Author Share Posted April 30, 2018 2 hours ago, PSWGM9100 said: Try this: https://wiki.multitheftauto.com/wiki/GuiSetAlpha vertical blinking line still visible\\ even with alpha = 0 Link to comment
Master_MTA Posted May 1, 2018 Share Posted May 1, 2018 10 hours ago, Juuve said: vertical blinking line still visible\\ even with alpha = 0 try to use this function to delete last character on the text function deleteLastCharacter(str) return(str:gsub("[%z\1-\127\194-\244][\128-\191]*$", "")) end addEventHandler("onClientCharacter", root, function(key) if guiGetVisible(backimg) then if string.match(key, '%a') or string.match(key, '%d') then if edit_l then local text = guiGetText(edit_login) text=deleteLastCharacter(text) text=deleteLastCharacter(text) guiSetText(edit_login,text..key) elseif edit_p then local text = guiGetText(edit_pass) text=deleteLastCharacter(text) text=deleteLastCharacter(text) guiSetText(edit_pass,text..key) elseif edit_conf_p then local text = guiGetText(edit_conf_pass) text=deleteLastCharacter(text) text=deleteLastCharacter(text) guiSetText(edit_conf_pass,text..key) end end end end) check if is it work or no 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