SixM
Single player ↗

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_personajes per 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_min minutes.
  • Inventory with weight (I). Items with salud can 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_s seconds 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 parado job, dinero_inicial money and 2 water, 2 bread and a phone.

Commands

CommandWhoWhat it does
/yo (/whoami)everyoneyour id and your witness
/dinero (/money)everyonecash and bank
/servicio (/duty)everyonego on or off duty
/dar_dinero <id> <cantidad> [efectivo|banco] (/give_money)admingives money
/trabajo <id> <trabajo> [rango] (/job)adminsets a job (parado, policia, medico, mecanico, taxista) and rank number
/dar_objeto <id> <objeto> [cantidad] (/give_item)admingives an item

Exports

All are server-side; id is the player's id and they act on the character that player is using.

ExportReturnsWhat it does
personaje(id)table or nilpersonaje, nombre, apellidos, efectivo, banco, trabajo, trabajo_id, rango, sueldo, idioma, servicio, inventario, peso, peso_max
dinero(id)efectivo, bancotheir money
dar_dinero(id, n, tipo, motivo)true/falseadds n (integer > 0) to "efectivo" or "banco"
quitar_dinero(id, n, tipo, motivo)true/falsesubtracts; fails if they don't have enough
transferir(de, a, n)true/falsebank to bank between two connected players
dar_objeto(id, objeto, n)true/falsefails if the item doesn't exist or doesn't fit
quitar_objeto(id, objeto, n)true/falsefails if they don't have that many
tiene(id, objeto)numberhow many they carry
objeto(nombre)table or nilthe item's record in Config.objetos
nombre_objeto(objeto, id)textthe item's name in that player's language
poner_trabajo(id, trabajo, rango)true/falsechanges job and rank (takes them off duty)
trabajo(id)trabajo, rango, de_serviciotheir current job
es_admin(id)true/falseroleplay 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)ArgumentsWhen
rp:personaje_listoid, nthe player has chosen a character and is in the game
rp:usoid, objetothey used an inventory item (after it was removed)

Configuration

config.lua (server side):

KeyDefaultWhat it does
max_personajes4characters per player
dinero_inicial{ efectivo = 500, banco = 2500 }money of a new character
peso_max30kilos a character carries
sueldo_cada_min15minutes between salary payments
guardar_cada_s60seconds between position and health saves
zonaan area box (x_min, x_max, y_min, y_max) plus aviso_s = 8where the roleplay takes place. nil = the whole map
admins{}witnesses with roleplay permissions, in addition to the admin lines of servidor.cfg
trabajosparado, policia, medico, mecanico, taxistaeach job with ranks from lowest to highest and each rank's salary. parado must exist. Names are { en = "...", es = "..." }
objetosagua, pan, bocadillo, venda, telefono, linterna, ganzuaeach 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

  • 0.1.0 sixm-rp.zip

    Nov 30, 2026 · 11 KB · 5 downloads

    SHA-256 c2e67ddd9d6825694798a979dadf9f41353c305fc675ad3cc47743c5c952c16d

    Download

Comments (0)

Log in — Log in to comment and rate.