Hello, Guest

By registering with us, you'll be able to discuss, share and private message with other members of our community.
What's new

JS Street RolePlay GrandRP Copy

Alexalsaud

Administrative
Staff member
Admin
Joined
Aug 5, 2024
Messages
337
ICoins
1,130
Street RolePlay

ABOUT
Leak of the finished build of the Street RP server (full working version) for RAGE Multiplayer.
The server modification is written in JavaScript (TS) + React (the visual part of the client).
The server part uses a database - MongoDB + Redis.
See all screenshots of the server functionality and video reviews and video tutorials on installation at the bottom of the page.

Installing and running the server:

⚠️ Note! To run this server build, you must have the following programs installed:

  • The source code editor is Visual Studio Code.
    Download -
  • The Javascript server platform is NodeJS.
    Download - (LTS version 18.15 required)
  • Version Control Extension - Git-SCM
    Download -
  • Database Server - MongoDB Community Server
    Download -
  • Console Utility - MongoDB Shell
    Download -
  • Additional database for server logs - Redis Server
    Download -
  1. Download the archive and extract all the files to a convenient place
    (not recommended on the desktop, it is better to go directly to one of the disks).

  2. We have a folder with server files in front of us, what does it contain?

    src_client - client source
    files src_server - server source
    files src_ui - visual source files (interfaces) .
    env file - basic server configuration (settings)

  3. The next step is to set up the development environment and install the necessary modules.

    In the server folder, open the command line (SHIFT + RMB in an empty space of the folder - then click on PowerShell)
    and execute the following commands one by one:

    Git:
    Git:
    npm install
    npm run build



  4. If you get an error during the installation - Error: spawn git ENOENT
    - then you need to install Git-SCM (the download link is at the top ↑).

  5. Go to the .env file in the server folder, open and see, the contents of the file should look like this:

  6. Git:
    Makefile:
    DB_URI=mongodb://localhost:27017/streetrpREDIS_HOST=127.0.0.1
    REDIS_PORT=6379
    REDIS_PASSWORD=
    MAIL_USER=admin@ragemp.pro
    MAIL_PASS=12345
    WEATHER_KEY=ВашКлючПогоды
    WEATHER_CITY=Moscow,RU
    DAILY_NEWS=
    INIT_DELAY=


    6. Next, install the database server - MongoDB Community Server (download link is at the top ↑).
    Wait for the installation to complete, start MongoDB Compass, connect to the local server and create a new
    database (by clicking the plus sign on the left), call it streetrp (also called .env in our config file).

    1223.pngView attachment 7


  7. Download and install the program - MongoDB Shell(the download link is at the top ↑).
    And throw into it (namely in the bin folder, next to the mongosh.exe) the database file from the folder with the server - database.sql

    In the folder with this program (namely in the bin folder, next to the mongosh.exe), open the command prompt (SHIFT + RMB in an empty place of the folder - then click on PowerShell) and execute the following commands one by one:


    Git:
    mongosh.exe<br>use streetrp<br>load(<span>'./database.sql'</span>);


    7.We are waiting for the end of the process and without any mistakes we should get the inscription - TRUE.
    With this step, we uploaded the necessary data (houses, factions, businesses, clothing) and other information to the database.
    2232.png

  8. 1 Next, the easiest step of all that is available, download and install another database:
    Redis Server (the download link is at the top ↑).1678368504886.png

  9. In the folder with the server, find the file - client_packages/game_resources/dlcpacks.txt in this text document there will be a link
    to download the archive with all dlcpacks, download and unzip the contents of the archive next to the text file.
    You should have a new folder - client_packages/game_resources/dlcpacks
    1678368462150.png
    Voila! You have installed the server, you can run the executable file - ragemp-server.exe and connect to the local IP!1678368367079.png

  10. Additional information:

    Attention! At the time of registration, a code is not sent to your email, it is written to you in the server console!
    Just copy the code from the console and paste it into the game to continue registration.

    1678327541480.png


  11. ✅ Solution - How to set up free mail sending in the Street RP

  12. In this topic, we will look at a free way to set up sending mail when registering in a new mod - Street Role Play

    First of all, we register in the mail service from Microsoft - .
    Oddly enough, this service still left free support for sending emails via SMTP.




  13. Outlook service limits:
    • No more than 100 emails daily using SMTP
    • No more than 500 emails daily using a browser
    • A single message can be delivered to up to 500 participants at the same time

  14. For your projects, it should be enough, if not, consider other mail services, such as Mailgun, SMTP.bz, etc.



  15. Next, we go to the server files, namely we need the file in the path - src_server\src\utils\mailer.ts
    In this file, find the function - init() and edit its contents, namely, change the host line to another value - smtp-mail.outlook.com

    An example of how it should turn out:

  16. JavaScript:
    JavaScript:
    init() {
            this.transporter = nodemailer.createTransport({
                //service: 'Outlook365', // Эту строчку можете закомментировать, она не нужна
                host: 'smtp-mail.outlook.com', // В этой строчке пишите тоже самое что у меня
                auth: {
                    user: process.env.MAIL_USER,
                    pass: process.env.MAIL_PASS
                }
            });
    
            this.transporter.verify((error) => {
                if (error) console.error(error);
                else logger.success('Email server ready.');
            });
        }


  17. The last step is to build the server (after all, we changed the server files, the build should always be done after any changes in the src_* folders) with the command:

  18. Git:
    Git:
    npm run build


  19. Voila, start the server and see a message in the console if the mail server is successfully connected:

    1678634472727.png

    Then we test the registration and we successfully receive the code by email:
    View attachment 15
  20. mod The admin panel is given in the database, namely in Collection - users, column - adminLvl. The maximum level is 4.

    Admin Levels:
    1 - Helper
    2 - Admin
    3 - GameMaster
    4 - Admin Team Owner

    :
    /esp
    - ESP
    /inv - Invisibility
    /adm - Admin Status
    /gm - Immortality

    Admin Keys:
    F6 - Flight
    F4 - Admin Menu

    If you press F4 and the admin panel menu does not open, then you have given the admin panel level above 4 (maximum).


    Video tutorial on installation:

    DOWNLOAD LINK TWO LINKS CHOOSE ONE
    https//cuty./XYZ ( SPACE ) http//cutyio/YZ
 

Attachments

  • 1723921224353.png
    1723921224353.png
    47.2 KB · Views: 63
Last edited:
Back
Top