abadabadu Posted October 22, 2014 Share Posted October 22, 2014 (edited) Example: 2 servers with same resource running ( server 1, server 2 ). 1 MySQL database with table named "users" containing nicks and passwords for all players. Player connects server 1 and log in with nick and password. Then player will know that his friend is playing in server 2. He leave server 1 and go to server 2. But player must to login again in server 2. Question: is there any way to avoid double login when changing servers ( if servers use single users database )? R there sessions or any other system? Edited October 23, 2014 by Guest Link to comment
Moderators IIYAMA Posted October 22, 2014 Moderators Share Posted October 22, 2014 saving the serial + cookie + timestamp - Serial for checking who he is. - Cookie and timestamp for security. Link to comment
abadabadu Posted October 22, 2014 Author Share Posted October 22, 2014 Cookie in gamemode resource? Wiki: These functions can only be used from within lua blocks in HTML pages hosted by the server. We cant use cookies for this aim. Serials also is not the best way. Wiki:However, you shouldn't rely on them entirely: serials may be able to be faked, although this is quite difficult to do, and it's very likely to cause errors to the client that can lead to a global ban if asking for help to fix them. It is also not guaranteed that two players will not have the same serial, but that is extremely unlikely. So there is no any built-in way,system, mechanizm developorers made to avoid double login when changing servers? Thanks for answer. Link to comment
Moderators IIYAMA Posted October 22, 2014 Moderators Share Posted October 22, 2014 When I am talking about a cookie I am not talking about html and shit. I am talking about something similar to that in mta: creating a clientside xml file, which contains a personal code. A code which another pc can't fake. If the code or serial doesn't match with the account, you have to re-login again. Timestamp is for extra security, so after a while the player has to re-login again. Link to comment
abadabadu Posted October 22, 2014 Author Share Posted October 22, 2014 Thanks for replay. Link to comment
abadabadu Posted October 22, 2014 Author Share Posted October 22, 2014 (edited) But does it work when player goes from one server to another. Not re-connect to same server, but moving from server 1 to server 2. Does this "xml file" available to another server 2 if it was created by server 1 ( resource running both servers is the same ) ? Edited October 22, 2014 by Guest Link to comment
Moderators IIYAMA Posted October 22, 2014 Moderators Share Posted October 22, 2014 yes, if the resource which this xml file is in uses the exact same name. Link to comment
crismar Posted October 22, 2014 Share Posted October 22, 2014 Or just have a MySQL column 'already_logged' which you change based on user actions then alter it with onPlayerQuit and your custom onPlayerLogin/onPlayerLogout events. 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