- auth-login.png: Bureau of Records login form (returning player) - auth-register.png: Bureau of Records registration form (new player) - roster.png: character ledger with slot entries - identity.png: Form IV — Declaration of Person - creator.png: character appearance editor (Build tab) - removed fishing.png (HUD not implemented yet) - updated bilingual README to reflect all new screens - removed fishing section from EN and RU docs
RedM RP Server
Red Dead Redemption 2 · FXServer · Node.js + Lua · MySQL · Ubuntu 24.04
Source code for the RedM RP server — a Wild West roleplay experience built on RDR2.
IP: 192.210.185.141:30120 · Game: rdr3 (RDR2, build 1491) · Max players: 32
Load Screen — redm-loading
Dark Western design inspired by telegraph dispatch offices. Shows the server name, a typewriter-style status line and a live connection percentage. Fonts: Abril Fatface (title) + Special Elite (status) + Old Standard TT (body).
Bureau of Records — rp-core
Account and character management styled as a paper ledger from the Bureau of Records, West Elizabeth.
Login
Returning players choose "I am on the register" and enter their credentials.
Registration
New arrivals choose "I am new to the territory" and create an account with username, e-mail and password.
Character Roster
After signing in, the player sees their character ledger — up to three slots with name, trade, purse and hours played. Vacant slots show a prompt to file a new character.
Character Identity — Form IV
Form IV — Declaration of Person. Players fill given name, family name, sex, date of birth and a backstory before entering the world.
Server files (server/)
| File | Does |
|---|---|
accounts.js |
Registration, login, bcrypt password hashing |
characters.js |
Character CRUD, roster load, retire (permanent delete) |
db.js |
mysql2 pool, named-placeholders, connection retry |
goods.js |
Inventory and item management |
passwords.js |
bcrypt hash + verify |
validate.js |
Field validation (username, email, date of birth) |
Client (client/main.lua) — NUI display and state machine; blocks movement until authed.
Character Creator — character-creator
A RDR2 appearance editor: sex, complexion, body stature, head shape, hair, beard and eye colour. Uses native SET_PED_* calls via feature tables in features.lua. The editor panel is NUI; camera and ped manipulation are Lua.
Tabs: Build · Face · Hair · Dress
Data files: data/body.json, data/hair.json, characters.json
HUD — rp-hud
A pocket watch in the corner. Two analog dials (vital and wind/stamina), a nameplate, clock and cash — the minimum the player needs without covering the scene. Position configurable via /hud and persisted in localStorage.
Layout
[dial-vital] [dial-wind]
[ JOHN MARSTON ]
14:32 $124.50
Admin — rp-admin
A thin Lua resource (client.lua) that wires admin chat commands to rp-core server exports. Requires ace group.admin.
Resource Load Order
redm-loading ← must be first; it narrates what loads next
mapmanager
spawnmanager
sessionmanager-rdr3 ← RDR2 session (not the GTA5 one)
chat
rp-core ← accounts + characters + DB pool
character-creator ← reads rp-core for slot count
rp-hud ← reads rp-core for name + cash
rp-admin ← reads rp-core for ACE checks
Stack
| Layer | Technology |
|---|---|
| Platform | FXServer (CitizenFX) — RDR2 mode |
| Server scripts | Node.js 22 (server/*.js) |
| Client scripts | Lua 5.4 (client/*.lua) |
| UI / NUI | HTML + CSS + Vanilla JS |
| Database | MySQL 8 via mysql2 (direct, no oxmysql) |
| Fonts | Abril Fatface · Special Elite · Old Standard TT |
| OS | Ubuntu 24.04 |
| Port | TCP + UDP 30120 |
Database Schema
-- Accounts
accounts (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(24) UNIQUE NOT NULL,
email VARCHAR(190) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL, -- bcrypt
created_at DATETIME DEFAULT NOW()
)
-- Characters (up to 3 per account)
characters (
id INT AUTO_INCREMENT PRIMARY KEY,
account_id INT NOT NULL REFERENCES accounts(id),
slot TINYINT NOT NULL,
given VARCHAR(24) NOT NULL,
family VARCHAR(24) NOT NULL,
sex ENUM('male','female') NOT NULL,
born_day TINYINT,
born_month TINYINT,
born_year SMALLINT,
backstory TEXT,
appearance JSON,
created_at DATETIME DEFAULT NOW()
)
-- Goods / inventory
goods (
id INT AUTO_INCREMENT PRIMARY KEY,
char_id INT NOT NULL REFERENCES characters(id),
item VARCHAR(64) NOT NULL,
qty INT NOT NULL DEFAULT 1,
data JSON
)
Quick Start
# 1. Clone
git clone https://git-1.redl.app/fivemservertest/redmrp-server.git /opt/redm/server-data
cd /opt/redm/server-data
# 2. Configure
cp server.cfg.example server.cfg
nano server.cfg # add sv_licenseKey
# Create db.cfg (mode 600):
# set mysql_host "127.0.0.1"
# set mysql_user "redm"
# set mysql_pass "your_password"
# set mysql_db "redmrp"
# 3. Install rp-core dependencies
cd resources/\[custom\]/rp-core && npm install && cd ../../..
# 4. Install FXServer (RDR2-capable build)
# Download from https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/
mkdir -p /opt/redm/server
tar -xf fx.tar.xz -C /opt/redm/server
# 5. Create database
mysql -u root -e "
CREATE DATABASE redmrp CHARACTER SET utf8mb4;
CREATE USER 'redm'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL ON redmrp.* TO 'redm'@'localhost';"
# 6. Run
/opt/redm/server/run.sh +exec /opt/redm/server-data/server.cfg
Ports
| Port | Protocol | Purpose |
|---|---|---|
30120 |
TCP | FXServer main |
30120 |
UDP | Game traffic |
3306 |
TCP | MySQL (localhost only) |
RedM RP Сервер (по-русски)
Red Dead Redemption 2 · FXServer · Node.js + Lua · MySQL · Ubuntu 24.04
Исходный код сервера RedM RP — ролевой сервер в духе Дикого Запада на движке RDR2.
IP: 192.210.185.141:30120 · Игра: rdr3 (RDR2, билд 1491) · Макс. игроков: 32
Экран загрузки — redm-loading
Тёмный дизайн в стиле телеграфного офиса Дикого Запада. Показывает название сервера, статус в стиле телетайпа и процент подключения. Шрифты: Abril Fatface (заголовок) + Special Elite (статус) + Old Standard TT (текст).
Бюро записей — rp-core
Система аккаунтов и персонажей, стилизованная под бумажный гроссбух Bureau of Records, West Elizabeth.
Вход
Вернувшиеся игроки выбирают «Я в реестре» и вводят данные аккаунта.
Регистрация
Новые игроки выбирают «Я новый в территории» и создают аккаунт — логин, email, пароль.
Выбор персонажа
После входа показывается гроссбух персонажей — до трёх слотов с именем, профессией, кошельком и временем игры. Пустой слот предлагает создать нового персонажа.
Форма IV — Декларация о личности
Игрок заполняет имя, фамилию, пол, дату рождения и предысторию персонажа перед входом в мир.
Серверные файлы (server/)
| Файл | Назначение |
|---|---|
accounts.js |
Регистрация, вход, bcrypt-хэширование паролей |
characters.js |
CRUD персонажей, загрузка ростера, удаление |
db.js |
Пул mysql2, именованные плейсхолдеры, переподключение |
goods.js |
Инвентарь и управление предметами |
passwords.js |
bcrypt-хэш + проверка |
validate.js |
Валидация полей (логин, email, дата рождения) |
Клиент (client/main.lua) — отображение NUI и конечный автомат; блокирует движение до авторизации.
Редактор персонажа — character-creator
Редактор внешности RDR2: пол, тон кожи, телосложение, форма головы, волосы, борода, цвет глаз. Использует нативные вызовы SET_PED_* через таблицы признаков в features.lua. Панель редактора — NUI; камера и манипуляции с персонажем — Lua.
Вкладки: Build (Телосложение) · Face (Лицо) · Hair (Волосы) · Dress (Одежда)
Файлы данных: data/body.json, data/hair.json, characters.json
HUD — rp-hud
Карманные часы в углу экрана. Два аналоговых циферблата (жизненная сила и выносливость), табличка с именем, время и деньги — минимум информации без закрытия сцены. Позиция настраивается через /hud и сохраняется в localStorage.
Раскладка
[циферблат-жизнь] [циферблат-ветер]
[ JOHN MARSTON ]
14:32 $124.50
Администрирование — rp-admin
Тонкий Lua-ресурс (client.lua), который привязывает команды администратора в чате к серверным экспортам rp-core. Требует ace group.admin.
Порядок загрузки ресурсов
redm-loading ← должен быть первым; он сопровождает загрузку
mapmanager
spawnmanager
sessionmanager-rdr3 ← сессия RDR2 (не GTA5)
chat
rp-core ← аккаунты + персонажи + пул БД
character-creator ← читает rp-core для количества слотов
rp-hud ← читает rp-core для имени + денег
rp-admin ← читает rp-core для ACE-проверок
Технический стек
| Слой | Технология |
|---|---|
| Платформа | FXServer (CitizenFX) — режим RDR2 |
| Серверные скрипты | Node.js 22 (server/*.js) |
| Клиентские скрипты | Lua 5.4 (client/*.lua) |
| UI / NUI | HTML + CSS + Vanilla JS |
| База данных | MySQL 8 через mysql2 (прямое подключение, без oxmysql) |
| Шрифты | Abril Fatface · Special Elite · Old Standard TT |
| ОС | Ubuntu 24.04 |
| Порт | TCP + UDP 30120 |
Схема базы данных
accounts (id, username, email, password[bcrypt], created_at)
characters (id, account_id, slot, given, family, sex,
born_day, born_month, born_year, backstory, appearance[JSON], created_at)
goods (id, char_id, item, qty, data[JSON])
Быстрый старт
# 1. Клонировать
git clone https://git-1.redl.app/fivemservertest/redmrp-server.git /opt/redm/server-data
cd /opt/redm/server-data
# 2. Настроить
cp server.cfg.example server.cfg
nano server.cfg # вставьте sv_licenseKey
# Создайте db.cfg (права 600):
# set mysql_host "127.0.0.1"
# set mysql_user "redm"
# set mysql_pass "ваш_пароль"
# set mysql_db "redmrp"
# 3. Установить зависимости rp-core
cd resources/\[custom\]/rp-core && npm install && cd ../../..
# 4. Запустить
/opt/redm/server/run.sh +exec /opt/redm/server-data/server.cfg
Порты
| Порт | Протокол | Назначение |
|---|---|---|
30120 |
TCP | Основное соединение FXServer |
30120 |
UDP | Игровой трафик |
3306 |
TCP | MySQL (только localhost) |






