Sign in to follow this  
MrPancakers

Base MySQL Gamemode [Login/Registration System]

Recommended Posts

RageMP Resource Link

Github Link (Development, this will more likely have bugs)

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 by MrPancakers
  • Like 5

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.