About This File
GitHub Repository: https://github.com/RageMpOpenSource/RAGE-Accounts
A MySQL boilerplate to quickly create an account system without all the work. This handles both logging in and registration. This also utilised the delayedInitilisation feature added in RAGE:MP 1.1 to allow time for your database and any other assets on your server to be loaded first before allowing any user connections. By using this feature, this avoids any errors of users connecting before your resources are done loading. Read below for more information. A custom config file has also been used to easily change your database variables (username/database name/database password) and will allow you to easily add more configuration options going forward.
- CEF Login/Registration pages with error handling
- Idle Kicker (Kicks any player who is sitting on the login/register pages after 60 seconds of no attempts)
- Promise Based Loading
- Easy Imported SQL into your MySQL Database
- MySQL Server (Fully setup)
- Download this resource and place it inside of your server folder
- Open your command prompt and change your directory of your command prompt to the server folder and then type npm install (You could also Shift + Right click inside your server folder and 'Open PowerShell window here' and type npm install if you don't know how to do this step)
- Head to packages/<folder>/settings.example.json and rename the file to settings.json (Remove the .example from the file name)
- Open up the settings.json file and edit the database details to connect to your server, if you're running it locally the default settings may be fine.
- Using the .sql file inside the server folder, run this inside your database to set it up (I won't be going into how to do this, Google "How to set up a MySQL server" if you don't know how to do this as I won't be offering support).
- Run your server, if there are no errors and it prints "Database connected successfully" then you're all done.
Looking for more information? Look at the GitHub repository here: https://github.com/RageMpOpenSource/RAGE-Accounts