Jump to content

12 Screenshots

About This File

RAGEMP ROLEPLAY GAMEMODE

A perfect game mode to get started with if you're about to make a roleplay server!

 

This game mode is still work in progress, I will maintain and update it generally, plenty features are planned to be added so stay tunned!

At current state, this gamemode is perfect to be used as a boilerplate for you to start a rp server!

Built in:

Client side:

  • Typescript
  • Webpack

Server side

  • Typescript
  • Webpack
  • Typeorm
  • PostgreSQL

Frontend(CEF)

  • ReactTS
  • MobX

 

Current Features

  •  - Account system (Login/Register).
  •  - Character System (3 Available slots to create)
  •  - Inventory System
  •  - Notification system
  •  - Chat System
  •  - Command system

 

Getting started with setting up:

Database setup:
This code requires you to have PostgreSQL installed on your machine, read more at https://www.postgresql.org/
After installing PostgreSQL, connect to your database using PGAdmin or HeidiSQL and create a new database by executing a query like: 

CREATE DATABASE mydb;

After creating a database successfully, head back to the server files and edit .env by describing the database connection details there.
Once you're setup with that, simply start the server, and the TypeORM will start creating the required database tables on its own (see Database.module.ts for deeper info)

 

Code Structure:

ragemp-rp-gamemode
├───config #contains webpack configuration files
├───frontend
│   └───src
│       ├───assets #contains assets such as page images or videos
│       ├───events #contains page events which can be called from the backend
│       ├───pages #contains pages
│       ├───stores #contains temporary stores
│       ├───styles #contains global styling
│       └───utils #contains useful code methods
│
├───source #contains backend code
│   ├───client #contains client-side code
│   ├───server #contains server-side code
│   └───shared #contains shared data between server and client
│
└───.env #contains database connection details

 

Getting started with development:

(BACKEND)

  1. Make sure you have an empty ragemp-server folder ready.
  2. After downloading the gamemode, move all files to your ragemp-server folder.
  3. Open the gamemode to your terminal and simply install the required packages executing 'npm install', this will install all required packages the gamemode uses.
  4. After the packages are installed make sure you created the database explained above.
  5. Start server-side in development mode: Simply execute 'npm run watch:server' to start watching server side in development mode.
  6. Start client-side in development mode: Simply execute 'npm run watch:client' to start watching client side in development mode.

(FRONTEND)

  1. Create a folder named package2 in client_packages folder.
  2. Navigate to frontend folder in your terminal.
  3. Install the required packages executing 'npm install'
  4. Once packages are done installing simply run 'npm run build'
  5. Once the build is done, it will automatically be moved to package2 folder.
  6. Once you're done, start the server and that's pretty much it.

 

Github link: shr0x/ragemp-rp-gamemode: A startup rp script to make your way into making a rp server easier! (github.com)

More docs are in the github repo, also keep an eye since most of the updates will be published there first then will eventually be updated in this post.

 

 

Edited by shrox
github link (shows now gamemode instead of framework)


What's New in Version 0.0.5-RC1   See changelog

Released

Additional

[+]Backpacks
-> Backpacks provide further slots for players in their inventory, a player can open a backpack at anytime using the modal menu.
-> Comes with two levels and 24 slots max, level 1 has 12 and level two has 24.
-> You can drop them, equip them and manage their inside items just as you would in the pockets category.

[+] Vehicle system
[+] Chat now suggest commands when typing them, pressing TAB would auto fill them.
[+] Ammunition system, if you have a pistol and you have 100 pistol ammo, those ammo will be automatically loaded to the pistol.
[+] Wearing a mask in inventory changes player's name to Stranger_Hashpart, hashpart comes from item generated UUID.
[+] Added /me & /b commands.
[+] Chat now support colors used on player.outputChatBox.
[+] Added area and street names now being displayed on the hud.
[+] Added player death and injury state (along with CEF update), player must wait at least 30 seconds and then he can press E to accept death.

Fixes

[*] Fixed an issue with item dropping not storing the item hash properly making you unable to pick a dropped inventory item.
[*] Fixed an issue with items conflicting with quick use not allowing you to move them.
[*] Fixed an issue with dragging ground items to clothes, the system was not actually giving you the item but instead it was completely deleting it.
[*] Fixed an issue with being unable to drop items from backpacks.
[*] Fixed some errors popping up when leaving a vehicle.

Changes

[/] Character entity is now linked with account entity.
[/] Character creator uses [key]:number instead of [string]:number for face features.
[/] Changed chat font family and font size.
[/] Tweak changes on speedometer and character spawn selection.

Code changes

[+] Added CommandRegistry.reloadCommands(player); to resend player commands to cef which then can be used as suggested commands in the chat.
[+] Player data now saves on the database everytime they quit the server.
[+] Cef events now support event registering to make your code writting easier.
[+] Rewrote inventory item drop code, simplified and it uses a map to store data instead of an object with keys and data.
[+] Added ChracterEntity.setStoreData(player, key, value); to update CEF store data for given player.

Read the full changelog Release v0.0.5-RC1 · shr0x/ragemp-rp-gamemode (github.com)

  • Like 4

User Feedback

Create an account or sign in to leave a review

You need to be a member in order to leave a review

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

ragempdev

   7 of 7 members found this review helpful 7 / 7 members

Awesome contribution - thanks for the release!

Mastin16

   1 of 1 member found this review helpful 1 / 1 member

Nice gamemode
How do I get the highest staff rank?

Response from the author:

Hi, either set it from the database or make a custom command for it.

Lookinforpercz

   1 of 2 members found this review helpful 1 / 2 members

Is there a full tutorial on how to install ?

Speechless

   0 of 4 members found this review helpful 0 / 4 members

Fuck your mom nigga

TheePandaa

   0 of 1 member found this review helpful 0 / 1 member

So Cool. What's the server PORT and how can i connect it? like this?: 127.0.0.1:22005 ?

DenzG

  

best practice i looking for. thanks 😊

×
×
  • Create New...