MrPancakers Posted May 25, 2018 Posted May 25, 2018 (edited) UPDATE I no longer recommend this resource and instead suggest using this resource: ==== I created a basic MySQL Login/Registration script which can register new accounts and login to ones already created. Passwords are encrypted using BCrypt so they're not plain text. As of now the database only stores a username, password, position and money for testing and examples. I'll be keeping this thread open for people to post any issues or suggestions, issues and suggestions can also be put into the repo to be easily tracked. I do plan to possibly implement a small admin system, however, this won't be put into this project, it'll be a separate download as the main focus for this is to simply have an example for any newcomers to understand how it works. Any suggestions/feedback are appreciated, trying to build on my Javascript skills through this project. Edited January 18, 2021 by MrPancakers 5
Joshua Posted May 25, 2018 Posted May 25, 2018 Well, no matter what the intentions are for this, it's great to have smaller resource to display things such as working with MySQL connections.
MrPancakers Posted May 25, 2018 Author Posted May 25, 2018 10 hours ago, Joshua said: Well, no matter what the intentions are for this, it's great to have smaller resource to display things such as working with MySQL connections. Yeah the plan was to just have it only released on Github and once tested a little it'll be put into the Rage resources tab, just wanted to be sure I actually had everything packed into it that are required and others are able to actually get it to work. 1
MrPancakers Posted May 26, 2018 Author Posted May 26, 2018 Updated the script, there are still some issues that don't make this 100% great(check Github Issues for those) but loading/saving functionality is in now and a test money command is implemented to show how to update a value.
MrPancakers Posted May 29, 2018 Author Posted May 29, 2018 Updates: Data now saves upon quitting the server Player position added to the DB (Your position now saves/loads upon logging in/registering) Added minimum requirements for username/password(Which means fixed the issue of being able to register without one) Your username upon registering should now apply Added a check to see if an account is currently logged into (This hasn't been tested with another player).
MrPancakers Posted July 1, 2018 Author Posted July 1, 2018 I officially published this as a resource on RageMP here: use that one if you want one that'll be working, otherwise, in the future, the Github version will always be considered a development branch and I cannot guarantee everything works.
MrPancakers Posted July 11, 2018 Author Posted July 11, 2018 I've updated this resource which fixes a clientside error occurring if two or more people where on the login screen, and also should fix accounts being logged into if they were in use (Credits to root for this). If you cannot wait for the update to be published, you can get the update on Github: https://github.com/MrPancakers/ragemp-mysql
MrPancakers Posted July 13, 2018 Author Posted July 13, 2018 43 minutes ago, edouardlicn said: I want to ask where the "gm.mysql.handle.query" from for i cannt find it in wiki. I made it, that isn't a RageMP function.
MrPancakers Posted July 13, 2018 Author Posted July 13, 2018 Just now, edouardlicn said: And where did it from?I want to have a look at the code. It's inside the auth.js file. There isn't very many files in this resource, it shouldn't be too hard to find.
javad_iran Posted September 7, 2018 Posted September 7, 2018 how to get money in MySQL Gamemode [Login/Registration System] the code not working: player.getMoney(250); please help me sorry for bad english...
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