MilWaxQ Posted July 22, 2019 Share Posted July 22, 2019 Hi. How could i make a Remember Me tickbox for my login panel? Thanks in advance! Link to comment
HassoN Posted July 22, 2019 Share Posted July 22, 2019 I'd recommend you to use xml functions. Once the player logs in, send a trigger to client side to create (if not created) a xml file, then add username + password to it. Next time player logs in, check if he has that file with the username + password, if yes, and your "Remember me" tickbox is activated, then put that text into your panel. Use: xmlLoadFile + xmlCreateFile -- load or create the xml file. xmlFindChild -- check if username and password exist xmlCreateChild -- if they do not exist, then create them. xmlNodeSetValue -- add the value of the player's password/username. -- and for loading the information you may use the same functions above. except xmlCreateChild and xmlNodeSetValue. Link to comment
MilWaxQ Posted July 22, 2019 Author Share Posted July 22, 2019 6 minutes ago, HassoN said: I'd recommend you to use xml functions. Once the player logs in, send a trigger to client side to create (if not created) a xml file, then add username + password to it. Next time player logs in, check if he has that file with the username + password, if yes, and your "Remember me" tickbox is activated, then put that text into your panel. Use: xmlLoadFile + xmlCreateFile -- load or create the xml file. xmlFindChild -- check if username and password exist xmlCreateChild -- if they do not exist, then create them. xmlNodeSetValue -- add the value of the player's password/username. -- and for loading the information you may use the same functions above. except xmlCreateChild and xmlNodeSetValue. Sorry but i nevers used xml functions. Could you explain it a little more? Sry for bad english. Link to comment
HassoN Posted July 22, 2019 Share Posted July 22, 2019 (edited) 4 minutes ago, MilWaxQ said: Sorry but i nevers used xml functions. Could you explain it a little more? Sry for bad english. Little example: local myXML = xmlCreateFile("test.xml", "loginInfo") local usernameNode = xmlCreateChild(myXML, "username") local passwordNode = xmlCreateChild(myXML, "password") xmlNodeSetValue(usernameNode, "HassoN") xmlNodeSetValue(passwordNode, "123") And here's your result: <loginInfo> <username>HassoN</username> <password>123</password> </loginInfo> Edited July 22, 2019 by HassoN Link to comment
MilWaxQ Posted July 22, 2019 Author Share Posted July 22, 2019 2 hours ago, HassoN said: Little example: local myXML = xmlCreateFile("test.xml", "loginInfo") local usernameNode = xmlCreateChild(myXML, "username") local passwordNode = xmlCreateChild(myXML, "password") xmlNodeSetValue(usernameNode, "HassoN") xmlNodeSetValue(passwordNode, "123") And here's your result: <loginInfo> <username>HassoN</username> <password>123</password> </loginInfo> Thank you so much.! Its Working! 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