SixM RP — roleplay core
Characters, cash and bank money, jobs with ranks and salary, inventory with weight and a roleplay zone, with exports for other resources.
Description
sixm-rp is the roleplay core of a SixM server, comparable to ESX or QBCore in FiveM. It stores each player's characters with their money, job and inventory, and offers exports so that other resources (stores, phone, your own) never touch that data directly. The server always decides; the client only asks.
Features
- Character selection on joining: choose or create one (first name, last name, date of birth). First and last names are 2 to 24 characters, without digits. Up to
max_personajesper player, tied to the player's witness (testigo). - Cash and bank money per character, with the last 50 movements logged, each with its reason.
- Jobs with ranks and salaries. Players on duty (and the unemployed) are paid into the bank every
sueldo_cada_minminutes. - Inventory with weight (
I). Items withsaludcan be used and heal that amount; any item can be dropped (one unit at a time). - HUD with money, job and duty status.
- Roleplay zone: anyone who leaves it gets
aviso_sseconds to come back, or is returned (with their vehicle) to the last place inside. - Position and health are saved periodically and when leaving; returning players appear where they left off (if inside the zone).
- A new character starts with the
paradojob,dinero_inicialmoney and 2 water, 2 bread and a phone.
Commands
| Command | Who | What it does |
|---|---|---|
/yo (/whoami) | everyone | your id and your witness |
/dinero (/money) | everyone | cash and bank |
/servicio (/duty) | everyone | go on or off duty |
/dar_dinero <id> <cantidad> [efectivo|banco] (/give_money) | admin | gives money |
/trabajo <id> <trabajo> [rango] (/job) | admin | sets a job (parado, policia, medico, mecanico, taxista) and rank number |
/dar_objeto <id> <objeto> [cantidad] (/give_item) | admin | gives an item |
Exports
All are server-side; id is the player's id and they act on the character that player is using.
| Export | Returns | What it does |
|---|---|---|
personaje(id) | table or nil | personaje, nombre, apellidos, efectivo, banco, trabajo, trabajo_id, rango, sueldo, idioma, servicio, inventario, peso, peso_max |
dinero(id) | efectivo, banco | their money |
dar_dinero(id, n, tipo, motivo) | true/false | adds n (integer > 0) to "efectivo" or "banco" |
quitar_dinero(id, n, tipo, motivo) | true/false | subtracts; fails if they don't have enough |
transferir(de, a, n) | true/false | bank to bank between two connected players |
dar_objeto(id, objeto, n) | true/false | fails if the item doesn't exist or doesn't fit |
quitar_objeto(id, objeto, n) | true/false | fails if they don't have that many |
tiene(id, objeto) | number | how many they carry |
objeto(nombre) | table or nil | the item's record in Config.objetos |
nombre_objeto(objeto, id) | text | the item's name in that player's language |
poner_trabajo(id, trabajo, rango) | true/false | changes job and rank (takes them off duty) |
trabajo(id) | trabajo, rango, de_servicio | their current job |
es_admin(id) | true/false | roleplay administrator (admin lines of servidor.cfg plus Config.admins) |
local rp = sixm.importa("sixm-rp")
if not rp.quitar_dinero(id, 80, "efectivo", "repair") then
-- not enough cash
end
Events
| Event (server) | Arguments | When |
|---|---|---|
rp:personaje_listo | id, n | the player has chosen a character and is in the game |
rp:uso | id, objeto | they used an inventory item (after it was removed) |
Configuration
config.lua (server side):
| Key | Default | What it does |
|---|---|---|
max_personajes | 4 | characters per player |
dinero_inicial | { efectivo = 500, banco = 2500 } | money of a new character |
peso_max | 30 | kilos a character carries |
sueldo_cada_min | 15 | minutes between salary payments |
guardar_cada_s | 60 | seconds between position and health saves |
zona | an area box (x_min, x_max, y_min, y_max) plus aviso_s = 8 | where the roleplay takes place. nil = the whole map |
admins | {} | witnesses with roleplay permissions, in addition to the admin lines of servidor.cfg |
trabajos | parado, policia, medico, mecanico, taxista | each job with ranks from lowest to highest and each rank's salary. parado must exist. Names are { en = "...", es = "..." } |
objetos | agua, pan, bocadillo, venda, telefono, linterna, ganzua | each item with peso in kg; those with salud can be used and heal that amount |
Data is stored in the resource's KVP: cuenta:<testigo>, pj:<n>, mov:<n> and sig_pj.
Requirements
Depends on sixm-base.
Installation
It already ships with the SixM server in recursos/sixm-rp. To install or reinstall it, unzip it into the server's recursos/ folder and add or keep this line in servidor.cfg:
asegura sixm-rp
Documentation: Roleplay framework.
Versions
- Download
0.1.0 sixm-rp.zip
Nov 30, 2026 · 11 KB · 5 downloads
SHA-256 c2e67ddd9d6825694798a979dadf9f41353c305fc675ad3cc47743c5c952c16d
Comments (0)
Log in — Log in to comment and rate.