Jump to content

Avoid double login when changing servers


abadabadu

Recommended Posts

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 by Guest
Link to comment

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

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

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 by Guest
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...