Barsuk777 Posted October 2, 2019 Posted October 2, 2019 Hi everyone, when writing a script, I had a problem with the server logic When a user logs on to the server, he enters the username and password, the server checks the data from the Database and sends him a response, after a while the user calls the server again to save, for example, his Vector3 position on the server in the Database, how does the server know what it is addresses, it is the user of this account who recently logged into the server. For example, if he writes the command / giveWeapon to the chat, the server will receive the players object and be able to give it a weapon, but how can the server find out which player this database is from
LeonMrBonnie Posted October 2, 2019 Posted October 2, 2019 You can use the MySQL AUTO_INCREMENT Feature for a unique id for every user, then you can assign the player's unique database id on login to him with .setVariable. 1
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