2026-08-13 19:05:58 +00:00
2026-08-13 19:05:58 +00:00
2026-08-13 19:05:58 +00:00
2026-08-13 19:05:58 +00:00
2026-08-13 19:05:58 +00:00

FiveRP — 0.1

A roleplay base for FiveM, written from scratch rather than forked from a framework. Eight resources: an account login, a character creator, permanent player IDs, authoritative money with a ledger, needs, a server-owned clock and a HUD. Everything a player can see is drawn by this repository; everything a player could cheat with is decided on the server.

Running against FXServer 25770 (recommended channel), GTA V game build 3751 (mp2025_02), OneSync on.


What it looks like

Loading screen — real streaming progress, not a fake bar.

Loading screen

Login — the account is the login and outlives every character on it.

Login

Registration — two steps, so nobody is asked for eight fields at once.

Registration

Identity — the name a character is known by for the rest of their life.

Identity

HUD — a dark overlay that never repeats what the game already draws. There is no health ring: health is on the minimap already. The bottom-left corner is left to the radar.

HUD

HUD settings (/hud) — every module can be turned off, and the choice is saved on that computer, not on the character.

HUD settings


What is inside

Resource What it owns
fiverp-loadscreen The loading screen, with real streaming progress
fiverp-auth Accounts: register, log in, bcrypt password hashes
fiverp-characters Character slots, the appearance creator, spawning
fiverp-ids Static ID (permanent, never reused) and dynamic ID (this session)
fiverp-economy Cash and bank, every movement written to a ledger
fiverp-status Hunger, thirst and mood, persisted per character
fiverp-time One clock for the whole server, running at real speed
fiverp-hud The in-game overlay and its settings panel

Server logic is JavaScript (Node 22, shipped inside FXServer), client logic is Lua, interfaces are plain HTML/CSS/JS with no build step — what is in the repo is what runs.

Two rules hold across all of it:

  • The client never decides anything it could profit from. The HUD is a renderer; money, IDs and needs are server state, sent down, never sent up.
  • No backdrop-filter and no box-shadow anywhere in NUI. CEF composites both as an opaque black rectangle the size of the element, which shows up in-game as black squares around every panel. Contrast comes from the panel's own background and a hairline border instead.

Requirements

  • Linux (built and run on Ubuntu 24.04; 2 GB RAM is enough for a small server)
  • FXServer artifacts, recommended channel — Linux builds
  • MariaDB 10.6+ or MySQL 8+
  • oxmysql — the only third-party resource used
  • A server key from keymaster.fivem.net

Install

1. Server files

mkdir -p /opt/fivem && cd /opt/fivem
curl -sSL -o fx.tar.xz https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/25770-<hash>/fx.tar.xz
mkdir server && tar -xJf fx.tar.xz -C server
git clone https://github.com/citizenfx/cfx-server-data.git server-data

Take the exact URL of the build marked recommended from the artifacts page — the hash changes with every build.

2. Database

apt-get install -y mariadb-server
mysql -e "CREATE DATABASE fiverp CHARACTER SET utf8mb4;"
mysql -e "CREATE USER 'fiverp'@'localhost' IDENTIFIED BY 'a-long-password';"
mysql -e "GRANT ALL ON fiverp.* TO 'fiverp'@'localhost';"
mysql fiverp < sql/schema.sql

The schema is not created by the resources at runtime, on purpose: a server that can silently reshape its own tables is one nobody can tell has been tampered with.

3. This repository

cd /opt/fivem/server-data
git clone https://git-1.redl.app/fivemservertest/fiverp-server.git /tmp/fiverp
cp -r /tmp/fiverp/resources/fiverp-* 'resources/[local]/'

And oxmysql into resources/[system]/oxmysql.

4. Config

cp /tmp/fiverp/server.cfg.example /opt/fivem/server-data/server.cfg

Then fill in, in that file:

  • sv_licenseKey — your key from keymaster
  • set mysql_connection_string — the user and password from step 2
  • sv_hostname / sets sv_projectName — the server's name, which is also what the HUD's top-right card shows

A semicolon inside a # comment still separates commands in a FiveM cfg, so the rest of that line gets executed. This is where mystery No such command … lines in the log come from. There are none in this file — keep it that way.

5. Run

cd /opt/fivem/server-data
/opt/fivem/server/run.sh +exec server.cfg

Port 30120 must be open on TCP and UDP. As a service:

# /etc/systemd/system/fivem.service
[Unit]
Description=FiveM server
After=network.target mariadb.service

[Service]
WorkingDirectory=/opt/fivem/server-data
ExecStart=/opt/fivem/server/run.sh +exec server.cfg
Restart=always

[Install]
WantedBy=multi-user.target

Connect with connect <your-ip> in the FiveM client's F8 console.


Configuration

Setting Default What it does
set fiverp_timezone Europe/Moscow The timezone the in-game clock runs in. Any IANA name.
sv_enforceGameBuild 3751 The GTA build every player is held to. Newer builds contain all older content.
set onesync on Required. Server-side state bags — which is how IDs, money and the clock reach the HUD — do not work without it.
sv_maxclients 32 Also the ceiling on dynamic IDs.

Staff commands are gated by an ACE, not by a hardcoded list:

add_principal identifier.fivem:1234567 group.admin
add_ace group.admin fiverp.economy allow

Commands

Command Who What
/hud anyone Open the HUD settings panel
/id anyone Your static and dynamic ID
/players anyone How many are connected, and how many are in the world
/balance anyone Cash and bank
/pay <id> <amount> anyone Hand cash to someone within 8 m — cash only, so it cannot be used as a remote wire transfer
/time anyone What the server clock says, and in which timezone
/givemoney <id> <cash|bank> <amount> admin Create money — written to the ledger with your license against it
/takemoney <id> <cash|bank> <amount> admin Remove money
/setmoney <id> <cash|bank> <amount> admin Set a balance outright
/setneed <id> <hunger|thirst|mood> <0-100> admin Set a need

Keys: B seatbelt, L lock or unlock the car you are in or looking at.


0.1 — what this version is

First tagged version. What works:

  • Account registration and login, characters, spawning, and returning to where you logged out
  • Static and dynamic IDs, and a player count that counts everyone connected — including the people still on the login screen
  • Money with a full transaction ledger, staff actions attributed to a license
  • Hunger, thirst and mood, decaying and persisted
  • One server clock at real speed, so every player's sun agrees with every other player's, and the date is the real date
  • The HUD, with per-computer settings

Known limits, honestly:

  • Nothing here has been load-tested with a full server. It has been run and verified with a handful of players.
  • No jobs, no vehicles you can own, no inventory. Money exists, but nothing worth spending it on ships in this version.
  • The vehicle panel's fuel is client-side. Fine for a HUD, not something to build a fuel economy on later without moving it server-side first.
  • sql/schema.sql is the only migration path. There is no migration runner yet, so upgrades between versions will be hand-applied SQL until there is.

CLAUDE.md in the root is the design system and the working rules for this codebase — read it before adding an interface, especially section 12, which is why the HUD is dark and the menus are light.

S
Description
No description provided
Readme
3.4 MiB
Languages
JavaScript 47%
CSS 27.5%
Lua 17.3%
HTML 8.2%